net.sf.basedb.util
Class Enumeration<K,V>
java.lang.Object
net.sf.basedb.util.Enumeration<K,V>
- All Implemented Interfaces:
- Serializable
public class Enumeration<K,V>
- extends Object
- implements Serializable
- Version:
- 2.0
- Author:
- Nicklas
- See Also:
- Serialized Form
- Last modified
- $Date: 2010-08-13 10:50:27 +0200 (Fri, 13 Aug 2010) $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
entries
private final List<Enumeration.Entry<K,V>> entries
locked
private boolean locked
Enumeration
public Enumeration()
isLocked
public boolean isLocked()
lock
public void lock()
size
public int size()
add
public int add(K key,
V value)
getKey
public K getKey(int index)
getValue
public V getValue(int index)
getEntry
public Enumeration.Entry<K,V> getEntry(int index)
remove
public void remove(int index)
sortKeys
public void sortKeys()
- This method will sort the enumration on the keys using
Collections.sort(List, Comparator)
.
The comparator will try to use the keys 'compareTo' method
if it implements the Comparable interface
otherwilse it will treat the key as a String.
sortValues
public void sortValues()
- This method will sort the enumration on the values using
Collections.sort(List, Comparator)
.
The comparator will try to use the values 'compareTo' method
if it implements the Comparable interface
otherwilse it will treat the value as a String.