|
|||||||||||
| 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.PMDTreeSet
This class implements the TreeSetIfc for the PMD database. The current implementation simply wraps the java.util.TreeSet and makes it persistent.
Future implementations will store handles instead of objects and hence making it more concurrent aware.
TreeSetIfc,
PersistentObject,
Serialized Form| Constructor Summary | |
PMDTreeSet()
The default constructor initialises the the TreeSet object. |
|
PMDTreeSet(java.util.Comparator comparator)
Construct a set with the specified constructor. |
|
| Method Summary | |
boolean |
add(java.lang.Object object)
Adds the specified element to this set if it is not already present.If the element alsready exists then return false, otherwise return true. |
void |
clear()
Removes all of the elements from this set. |
java.util.Comparator |
comparator()
Returns the comparator used to order this set or null if this set uses natural ordering |
boolean |
contains(java.lang.Object object)
Test whether the set contains the speciied object.If the object cannot be compared with other elements in the set the ClassCastException is raised. |
java.lang.Object |
first()
Returns the first (lowest) key currently in this sorted set.It throws NoSuchElementException if the element does not exist. |
boolean |
isEmpty()
Test is the set is empty |
java.util.Iterator |
iterator()
Returns an iterator for the elements in this set. |
java.lang.Object |
last()
Returns the last (highest) key currently in this sorted map.It throws NoSuchElementException if the element does not exist. |
void |
readExternal(java.io.ObjectInput stream)
|
boolean |
remove(java.lang.Object object)
Removes the given element from this set if it is present. |
int |
size()
Returns the number elements in the set |
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 PMDTreeSet()
public PMDTreeSet(java.util.Comparator comparator)
comparator - used for ordering| Method Detail |
public java.util.Iterator iterator()
iterator in interface TreeSetIfcpublic int size()
size in interface TreeSetIfcpublic boolean isEmpty()
isEmpty in interface TreeSetIfcpublic boolean contains(java.lang.Object object)
contains in interface TreeSetIfcobject - object to test for
java.lang.ClassCastExceptionpublic boolean add(java.lang.Object object)
add in interface TreeSetIfcobject - object to add
java.lang.ClassCastExceptionpublic boolean remove(java.lang.Object object)
remove in interface TreeSetIfcobject - object to remove
java.lang.ClassCastExceptionpublic void clear()
clear in interface TreeSetIfcpublic java.util.Comparator comparator()
comparator in interface TreeSetIfcpublic java.lang.Object first()
first in interface TreeSetIfcNoSuchElementExceptionpublic java.lang.Object last()
last in interface TreeSetIfcNoSuchElementException
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 | ||||||||||