info.rolandkrueger.roklib.util
Interface ITernarySearchTreeMap<V>
- All Superinterfaces:
- Map<CharSequence,V>, SortedMap<CharSequence,V>
- All Known Implementing Classes:
- TernarySearchTreeMap, TernarySearchTreeMapCaseInsensitive
public interface ITernarySearchTreeMap<V>
- extends SortedMap<CharSequence,V>
Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
Methods inherited from interface java.util.Map |
clear, containsKey, containsValue, equals, get, hashCode, isEmpty, put, putAll, remove, size |
matchAlmost
SortedSet<CharSequence> matchAlmost(CharSequence key,
int distance,
int lengthTolerance)
- Generates an ordered list of keys that partially match the method's
argument key. This can be useful for spell checking or the like. The
method's framework and its underlying algorithm is adopted from the above
mentioned article on Javaworld by Wally Flint.
- Parameters:
key
- The key's toString()
method is used to generate a
string representation of that key in order to find a set of
partially matching keys differing only by a number of
distance
characters.distance
- The number of maximum characters that may be different from the
characters of key
.lengthTolerance
- specifies by how many characters the length of the resulting set's
strings may differ from the length of the search key.
getEntry
Map.Entry<CharSequence,V> getEntry(Object key)
getValueAt
V getValueAt(int index)
getKeyAt
CharSequence getKeyAt(int index)
indexOf
int indexOf(CharSequence key)
- Returns the index of the specified key if it is stored in the map.
Otherwise -1 is returned. The indexing is the same as with arrays, i.e. the
first element in the map has index 0 and the last element has index
size()-1
.
- Parameters:
key
- The key whose index is to be returned.
- Returns:
- int the key's index or -1 if the key isn't an element of the map.
getKeysForPrefix
Iterable<CharSequence> getKeysForPrefix(CharSequence prefix)
getPrefixSubtreeIterator
Iterator<Map.Entry<CharSequence,V>> getPrefixSubtreeIterator(String prefix)
getPrefixSubtreeIterator
Iterator<Map.Entry<CharSequence,V>> getPrefixSubtreeIterator(String pPrefix,
boolean inverseSearch)
predecessor
Map.Entry<CharSequence,V> predecessor(Object keyObject)
successor
Map.Entry<CharSequence,V> successor(Object keyObject)
Copyright © 2007-2011. All Rights Reserved.