goldman.collection.ordered.digitized
Interface DigitizedOrderedCollection<E>

All Superinterfaces:
Collection<E>, Iterable<E>, OrderedCollection<E>
All Known Implementing Classes:
CompactTrie, CompressedTrie, PatriciaTrie, TernarySearchTrie, Trie

public interface DigitizedOrderedCollection<E>
extends OrderedCollection<E>

A digitized ordered collection is an untagged algorithmically positioned collection whose elements can each be viewed as a sequence of digits (e.g., bit string, character string). The DigitizedOrderedCollection interface extends the OrderedCollection interface by adding methods to find all extensions of a given prefix, and also to find all elements in the collection that have the longest prefix match with a given element.


Method Summary
 void completions(E prefix, Collection<? super E> c)
          Appends all elements in this collection that have the given prefix to the given collection c.
 void longestCommonPrefix(E element, Collection<? super E> c)
          Appends to the provided collection c all elements in this collection that have a longest common prefix with element.
 
Methods inherited from interface goldman.collection.ordered.OrderedCollection
get, getEquivalentElement, iteratorAtEnd, max, min, predecessor, successor
 
Methods inherited from interface goldman.collection.Collection
accept, add, addAll, checkRep, clear, contains, ensureCapacity, getCapacity, getComparator, getLocator, getSize, isEmpty, iterator, remove, retainAll, toArray, toArray, toString, trimToSize
 

Method Detail

completions

void completions(E prefix,
                 Collection<? super E> c)
Appends all elements in this collection that have the given prefix to the given collection c. We consider an element to be a prefix of itself.


longestCommonPrefix

void longestCommonPrefix(E element,
                         Collection<? super E> c)
Appends to the provided collection c all elements in this collection that have a longest common prefix with element.