|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgoldman.collection.tagged.TaggedCollectionWrapper<T,E>
goldman.collection.tagged.ordered.TaggedOrderedCollectionWrapper<T,E>
public abstract class TaggedOrderedCollectionWrapper<T,E>
The tagged ordered collection wrapper can wrap any ordered collection implementation, where each element in the collection is a tagged element. It is required that the comparator depends only on the tag, and the tag is immutable.
Field Summary |
---|
Fields inherited from class goldman.collection.tagged.TaggedCollectionWrapper |
---|
pairs, target |
Constructor Summary | |
---|---|
TaggedOrderedCollectionWrapper(OrderedCollection<TaggedElement<T,E>> pairs)
|
Method Summary | |
---|---|
Locator<TaggedElement<T,E>> |
iteratorAtEnd()
Creates and returns a new locator initialized to AFT. |
TaggedElement<T,E> |
max()
Returns a tagged element for the greatest tag in the collection (according to the comparator). |
TaggedElement<T,E> |
min()
Returns a tagged element for the least tag in the collection (according to the comparator). |
T |
predecessor(T tag)
This method does not require that tag is in use. |
Locator<TaggedElement<T,E>> |
putTracked(T tag,
E element)
Creates a new tagged element with the given values and inserts this tagged element into this collection |
T |
successor(T tag)
This method does not require that tag is in use. |
Methods inherited from class goldman.collection.tagged.TaggedCollectionWrapper |
---|
accept, clear, contains, elements, ensureCapacity, get, getCapacity, getLocator, getSize, isEmpty, iterator, put, putAll, remove, tags, toString, trimToSize, values |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface goldman.collection.tagged.TaggedCollection |
---|
accept, clear, contains, elements, ensureCapacity, get, getCapacity, getLocator, getSize, isEmpty, iterator, put, putAll, remove, tags, toString, trimToSize, values |
Methods inherited from interface goldman.collection.tagged.TaggedCollection |
---|
accept, clear, contains, elements, ensureCapacity, get, getCapacity, getLocator, getSize, isEmpty, iterator, put, putAll, remove, tags, toString, trimToSize, values |
Constructor Detail |
---|
public TaggedOrderedCollectionWrapper(OrderedCollection<TaggedElement<T,E>> pairs)
Method Detail |
---|
public TaggedElement<T,E> min()
TaggedOrderedCollection
NoSuchElementException
when the collection is empty.
min
in interface TaggedOrderedCollection<T,E>
NoSuchElementException
- the collection is empty.public TaggedElement<T,E> max()
TaggedOrderedCollection
NoSuchElementException
when the collection is empty.
max
in interface TaggedOrderedCollection<T,E>
NoSuchElementException
- the collection is empty.public T predecessor(T tag)
tag
is in use.
predecessor
in interface TaggedOrderedCollection<T,E>
tag
- the tag for which to find the
predecessor
tag
.
NoSuchElementException
- there is no tag used in the collection
less than tag
public T successor(T tag)
tag
is in use.
successor
in interface TaggedOrderedCollection<T,E>
tag
- the tag for which to find the
successor
tag
.
NoSuchElementException
- there is no tag used in the collection greater than tag
public Locator<TaggedElement<T,E>> putTracked(T tag, E element)
putTracked
in interface TrackedTagged<T,E>
tag
- the tag for the tagged element to addelement
- the associated data
AtCapacityException
- the
collection is already at capacity.public Locator<TaggedElement<T,E>> iteratorAtEnd()
iteratorAtEnd
in interface TaggedOrderedCollection<T,E>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |