goldman.collection.tagged.ordered
Interface TaggedOrderedCollection<T,E>

All Superinterfaces:
Iterable<TaggedElement<T,E>>, TaggedCollection<T,E>
All Known Subinterfaces:
TaggedDigitizedOrderedCollection<T,E>
All Known Implementing Classes:
TaggedBinarySearchTree, TaggedBPlusTree, TaggedBTree, TaggedCompactTrie, TaggedCompressedTrie, TaggedDigitizedOrderedCollectionWrapper, TaggedOrderedCollectionWrapper, TaggedPatriciaTrie, TaggedRedBlackTree, TaggedSkipList, TaggedSortedArray, TaggedSplayTree, TaggedTernarySearchTrie, TaggedTrie

public interface TaggedOrderedCollection<T,E>
extends TaggedCollection<T,E>

A tagged variation of the OrderedCollection ADT


Method Summary
 Locator<TaggedElement<T,E>> iteratorAtEnd()
          Returns a locator that has been 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)
          Returns the largest tag used by some tagged element in the collection that is less than tag.
 T successor(T tag)
          Returns smallest tag used by some tagged element in the collection that is greater than tag.
 
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
 

Method Detail

min

TaggedElement<T,E> min()
Returns a tagged element for the least tag in the collection (according to the comparator). More specifically, the first tagged element in the iteration order is returned. This method throws a NoSuchElementException when the collection is empty.


max

TaggedElement<T,E> max()
Returns a tagged element for the greatest tag in the collection (according to the comparator). More specifically, the last tagged element in the iteration order is returned. This method throws a NoSuchElementException when the collection is empty.


predecessor

T predecessor(T tag)
Returns the largest tag used by some tagged element in the collection that is less than tag. It does not require that tag is in use. It throws a NoSuchElementException when there is no tag in the collection less than tag.


successor

T successor(T tag)
Returns smallest tag used by some tagged element in the collection that is greater than tag. It does not require that tag is in use. It throws NoSuchElementException when there is no tag used in the collection greater than tag.


iteratorAtEnd

Locator<TaggedElement<T,E>> iteratorAtEnd()
Returns a locator that has been initialized to AFT. As with the iterator method, this method enables navigation.