goldman.collection.tagged.ordered.digitized
Class TaggedDigitizedOrderedCollectionWrapper<T,E>
java.lang.Object
goldman.collection.tagged.TaggedCollectionWrapper<T,E>
goldman.collection.tagged.ordered.TaggedOrderedCollectionWrapper<T,E>
goldman.collection.tagged.ordered.digitized.TaggedDigitizedOrderedCollectionWrapper<T,E>
- All Implemented Interfaces:
- TaggedDigitizedOrderedCollection<T,E>, TaggedOrderedCollection<T,E>, TaggedCollection<T,E>, TrackedTagged<T,E>, Iterable<TaggedElement<T,E>>
- Direct Known Subclasses:
- TaggedCompactTrie, TaggedCompressedTrie, TaggedPatriciaTrie, TaggedTernarySearchTrie, TaggedTrie
public abstract class TaggedDigitizedOrderedCollectionWrapper<T,E>
- extends TaggedOrderedCollectionWrapper<T,E>
- implements TaggedDigitizedOrderedCollection<T,E>, TrackedTagged<T,E>
The tagged ordered collection wrapper can wrap any digitized 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.
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 interface goldman.collection.tagged.TaggedCollection |
accept, clear, contains, elements, ensureCapacity, get, getCapacity, getLocator, getSize, isEmpty, iterator, put, putAll, remove, tags, toString, trimToSize, values |
TaggedDigitizedOrderedCollectionWrapper
public TaggedDigitizedOrderedCollectionWrapper(DigitizedOrderedCollection<TaggedElement<T,E>> pairs)
completions
public void completions(T prefix,
Collection<? super TaggedElement<T,E>> tc)
- Description copied from interface:
TaggedDigitizedOrderedCollection
- Adds
to the provided tagged collection,
tc
, all tagged elements for which the tag has the given prefix.
(We consider a tag to be a prefix of itself.)
- Specified by:
completions
in interface TaggedDigitizedOrderedCollection<T,E>
- Parameters:
prefix
- the desired prefixtc
- the tagged collection to append all tagged elements
for which the tag has the given prefix
longestCommonPrefix
public void longestCommonPrefix(T tag,
Collection<? super TaggedElement<T,E>> tc)
- Description copied from interface:
TaggedDigitizedOrderedCollection
- Adds
to
the provided tagged collection,
tc
, all tagged elements in this collection whose tag has a longest common
prefix with tag
.
- Specified by:
longestCommonPrefix
in interface TaggedDigitizedOrderedCollection<T,E>
- Parameters:
tag
- the desired prefixtc
- the tagged collection to append all tagged elements
in this collection where the tag has a longest common
prefix with tag
.