public class PatriciaTrie<V> extends AbstractIndex<V> implements FuzzyIndex<V>
FuzzyIndex interface.
Note that this implementation is not synchronized.
| Constructor and Description |
|---|
PatriciaTrie()
Constructs a new
PatriciaTrie. |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Removes all key-value associations.
|
Set<V> |
getAll(String key)
Returns a
Set of all values associated with a key. |
Set<ScoredObject<V>> |
getAny(Automaton matcher)
Returns a
Set of all values associated with a key matcher. |
Set<ScoredObject<V>> |
getAny(String fragment)
Returns a
Set of all values associated with a key fragment. |
boolean |
isEmpty()
Returns
true if no key-value associations exist. |
boolean |
putAll(String key,
Collection<V> values)
Associates a collection of values with a key.
|
boolean |
removeAll(Collection<V> values)
Removes a collection of values associated with any keys.
|
Set<V> |
removeAll(String key)
Removes all values associated with a key.
|
boolean |
removeAll(String key,
Collection<V> values)
Removes a collection of values associated with a key.
|
int |
size()
Returns the number of key-value associations.
|
put, remove, removepublic PatriciaTrie()
PatriciaTrie.public void clear()
Indexpublic Set<V> getAll(String key)
IndexSet of all values associated with a key.public Set<ScoredObject<V>> getAny(String fragment)
FuzzyIndexSet of all values associated with a key fragment.getAny in interface FuzzyIndex<V>public Set<ScoredObject<V>> getAny(Automaton matcher)
FuzzyIndexSet of all values associated with a key matcher.getAny in interface FuzzyIndex<V>public boolean isEmpty()
Indextrue if no key-value associations exist.public boolean putAll(String key, Collection<V> values)
Indexpublic boolean removeAll(Collection<V> values)
Indexpublic Set<V> removeAll(String key)
Indexpublic boolean removeAll(String key, Collection<V> values)
IndexCopyright © 2017. All rights reserved.