|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TreeMapIfc
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 |
---|
int size()
boolean containsKey(java.lang.Object key)
key
- key whose value to find
java.lang.ClassCastException
java.lang.NullPointerException
boolean containsValue(java.lang.Object value)
value
- test for this value
java.lang.Object get(java.lang.Object key)
key
- key whose value to find
java.lang.ClassCastException
java.lang.NullPointerException
java.util.Comparator comparator()
java.lang.Object firstKey()
NoSuchElementException
java.lang.Object lastKey()
NoSuchElementException
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
java.lang.Object remove(java.lang.Object key)
key
- key whose value to remove
ClassCastEzception
java.lang.NullPointerException
void clear()
java.util.Set keySet()
boolean isEmpty()
java.util.Collection elements()
java.util.SortedMap tailMap(java.lang.Object key)
id
- The key to compare to.
java.util.SortedMap sortedMap()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |