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, remove
public PatriciaTrie()
PatriciaTrie
.public void clear()
Index
public Set<V> getAll(String key)
Index
Set
of all values associated with a key.public Set<ScoredObject<V>> getAny(String fragment)
FuzzyIndex
Set
of all values associated with a key fragment.getAny
in interface FuzzyIndex<V>
public Set<ScoredObject<V>> getAny(Automaton matcher)
FuzzyIndex
Set
of all values associated with a key matcher.getAny
in interface FuzzyIndex<V>
public boolean isEmpty()
Index
true
if no key-value associations exist.public boolean putAll(String key, Collection<V> values)
Index
public boolean removeAll(Collection<V> values)
Index
public Set<V> removeAll(String key)
Index
public boolean removeAll(String key, Collection<V> values)
Index
Copyright © 2017. All rights reserved.