|
||||||||||
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
public class 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 FormConstructor 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 orderingMethod Detail |
---|
public java.util.Iterator iterator()
iterator
in interface TreeSetIfc
public int size()
size
in interface TreeSetIfc
public boolean isEmpty()
isEmpty
in interface TreeSetIfc
public boolean contains(java.lang.Object object)
contains
in interface TreeSetIfc
object
- object to test for
java.lang.ClassCastException
public boolean add(java.lang.Object object)
add
in interface TreeSetIfc
object
- object to add
java.lang.ClassCastException
public boolean remove(java.lang.Object object)
remove
in interface TreeSetIfc
object
- object to remove
java.lang.ClassCastException
public void clear()
clear
in interface TreeSetIfc
public java.util.Comparator comparator()
comparator
in interface TreeSetIfc
public java.lang.Object first()
first
in interface TreeSetIfc
NoSuchElementException
public java.lang.Object last()
last
in interface TreeSetIfc
NoSuchElementException
public void writeExternal(java.io.ObjectOutput stream) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
writeExternal
in class PersistentObject
java.io.IOException
public void readExternal(java.io.ObjectInput stream) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
readExternal
in class PersistentObject
java.io.IOException
java.lang.ClassNotFoundException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |