|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.exolab.core.foundation.PersistentObject
org.exolab.core.database.recman.PMDTreeMap
This is an implementation of the TreeMapIfc for the PMD datastore. The implementation currently uses java.util.TreeMap but this will be changed in a subsequent release to provide a more concurrent capable container and take advantages of this database's features.
TreeMapIfc,
PersistentObject,
Serialized Form| Constructor Summary | |
PMDTreeMap()
Default constructor simply instantiates an instance of a TreeMap |
|
PMDTreeMap(java.util.Comparator comparator)
Construct an instance of a TreeMap with the specified comparator. |
|
| 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. |
void |
readExternal(java.io.ObjectInput stream)
|
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. |
void |
writeExternal(java.io.ObjectOutput stream)
|
| Methods inherited from class org.exolab.core.foundation.PersistentObject |
clone, equals, getId, getMinimumObjectSize, getObjectId, getObjectVersion, getVersion, setId, setMinimumObjectSize, setObjectId, setObjectVersion, setVersion |
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.exolab.core.foundation.PersistentCapableIfc |
getMinimumObjectSize, getObjectId, getObjectVersion, setMinimumObjectSize |
| Constructor Detail |
public PMDTreeMap()
public PMDTreeMap(java.util.Comparator comparator)
comparator - used for ordering| Method Detail |
public int size()
size in interface TreeMapIfcpublic boolean containsKey(java.lang.Object key)
containsKey in interface TreeMapIfckey - key whose value to find
java.lang.ClassCastException
java.lang.NullPointerExceptionpublic boolean containsValue(java.lang.Object value)
containsValue in interface TreeMapIfcvalue - test for this value
public java.lang.Object get(java.lang.Object key)
get in interface TreeMapIfckey - key whose value to find
java.lang.ClassCastException
java.lang.NullPointerExceptionpublic java.util.Comparator comparator()
comparator in interface TreeMapIfcpublic java.lang.Object firstKey()
firstKey in interface TreeMapIfcNoSuchElementExceptionpublic java.lang.Object lastKey()
lastKey in interface TreeMapIfcNoSuchElementException
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
put in interface TreeMapIfckey - key objectvalue - value object
java.lang.ClassCastException
java.lang.NullPointerExceptionpublic java.lang.Object remove(java.lang.Object key)
remove in interface TreeMapIfckey - key whose value to remove
ClassCastEzception
java.lang.NullPointerExceptionpublic void clear()
clear in interface TreeMapIfcpublic java.util.Set keySet()
keySet in interface TreeMapIfcpublic boolean isEmpty()
isEmpty in interface TreeMapIfcpublic java.util.Collection elements()
elements in interface TreeMapIfcpublic java.util.SortedMap tailMap(java.lang.Object key)
tailMap in interface TreeMapIfcpublic java.util.SortedMap sortedMap()
sortedMap in interface TreeMapIfc
public void writeExternal(java.io.ObjectOutput stream)
throws java.io.IOException
writeExternal in interface java.io.ExternalizablewriteExternal in class PersistentObjectjava.io.IOException
public void readExternal(java.io.ObjectInput stream)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.ExternalizablereadExternal in class PersistentObjectjava.io.IOException
java.lang.ClassNotFoundException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||