|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface abstracts the Persistent TreeMap data structure so that it can be mapped to various persistent and transient datastores. It basically uses the JDK1.1.2 java.util.TreeMap to derive the interface.
PersistentCapableIfc
,
Serializable
Method Summary | |
void |
clear()
Removes all mappings from this TreeMap. |
java.util.Comparator |
comparator()
Returns the comparator used to order this map or null if this map uses natural ordering |
boolean |
containsKey(java.lang.Object key)
Test whether a particular key is mapped to an object in the container. |
boolean |
containsValue(java.lang.Object value)
Returns true if this map maps one or more keys to the specified value. |
java.util.Collection |
elements()
Return an enumeration of all the elements in the map |
java.lang.Object |
firstKey()
Returns the first (lowest) key currently in this sorted map.It throws NoSuchElementException if the element does not exist. |
java.lang.Object |
get(java.lang.Object key)
Returns the value associated with the specified key. |
boolean |
isEmpty()
Test is the map is empty |
java.util.Set |
keySet()
Returns a Set view of the keys contained in this map. |
java.lang.Object |
lastKey()
Returns the last (highest) key currently in this sorted map.It throws NoSuchElementException if the element does not exist. |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Associates the specified value with the specified key in this map. |
java.lang.Object |
remove(java.lang.Object key)
Removes the mapping for this key from this TreeMap if present.If the key cannot be compared to other values in the map then thorw the Class- castExcpetion. |
int |
size()
Returns the number of key-value mappings in this map. |
java.util.SortedMap |
sortedMap()
Returns the internal TreeMap |
java.util.SortedMap |
tailMap(java.lang.Object key)
Returns a view of the portion of this map whose keys are greater than or equal to fromKey. |
Methods inherited from interface org.exolab.core.foundation.PersistentCapableIfc |
getMinimumObjectSize, getObjectId, getObjectVersion, setMinimumObjectSize |
Method Detail |
public int size()
public boolean containsKey(java.lang.Object key)
key
- key whose value to find
java.lang.ClassCastException
java.lang.NullPointerException
public boolean containsValue(java.lang.Object value)
value
- test for this value
public java.lang.Object get(java.lang.Object key)
key
- key whose value to find
java.lang.ClassCastException
java.lang.NullPointerException
public java.util.Comparator comparator()
public java.lang.Object firstKey()
NoSuchElementException
public java.lang.Object lastKey()
NoSuchElementException
public java.lang.Object put(java.lang.Object key, java.lang.Object value)
If the key cannot be compared with other keys in the map it will throw the ClassCastException. Similarly, if the key is null and the map uses natural ordering or its comparator cannot tolerate null keys throw the NullPointerException
key
- key objectvalue
- value object
java.lang.ClassCastException
java.lang.NullPointerException
public java.lang.Object remove(java.lang.Object key)
key
- key whose value to remove
ClassCastEzception
java.lang.NullPointerException
public void clear()
public java.util.Set keySet()
public boolean isEmpty()
public java.util.Collection elements()
public java.util.SortedMap tailMap(java.lang.Object key)
public java.util.SortedMap sortedMap()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |