|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectedu.uky.rch.ept.xmlSegmentTree.ElementSet
A set of Elements. Modifications to the set return the new set;
the old set is unmodified.
| Nested Class Summary | |
class |
ElementSet.Iterator
An iterator over an ElementSet. |
| Constructor Summary | |
ElementSet()
Create an empty set of elements. |
|
| Method Summary | |
void |
addTo(Collection c)
Append the elements of this set to a specfied collection. |
protected static int |
compare(Element a,
Element b)
Compare two elements, returning -1, 1, 0 as the first precedes, follows, or is order-equivalent to the second. |
ElementSet |
insert(Element e)
Return the result of inserting a new element into this set. |
boolean |
isEmpty()
Test whether this set is empty |
Iterator |
iterator()
Return an iterator over the elements of this set. |
ElementSet |
remove(Element e)
Return the result of removing an element from this set. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ElementSet()
| Method Detail |
public boolean isEmpty()
public ElementSet insert(Element e)
e - the new element to add.
ElementSet containing the elements in this
set, as well as e.public ElementSet remove(Element e)
equals(). If multiple elements in the
set are equal to the specified element, only one of them is removed.
e - the element to remove.
ElementSet containing the elements in this
set, except for e.public Iterator iterator()
compare(edu.uky.rch.ept.xmlSegmentTree.element.Element, edu.uky.rch.ept.xmlSegmentTree.element.Element)). The returned
iterator may not be used to modify the set.
public void addTo(Collection c)
compare(edu.uky.rch.ept.xmlSegmentTree.element.Element, edu.uky.rch.ept.xmlSegmentTree.element.Element)).
c - the collection to modify.
protected static int compare(Element a,
Element b)
a - the first element to compare.b - the second element to compare.
a precedes, follows, or
is order-equivalent to b.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||