K - key typeV - value typepublic class UnorderedIndex<K,V> extends java.lang.Object implements Index<K,V>
| Constructor and Description |
|---|
UnorderedIndex() |
| Modifier and Type | Method and Description |
|---|---|
java.util.Set<V> |
find(K key)
Finds all values indexed by the given key.
|
void |
forEachValue(Consumer<V> consumer)
Iterates over each value indexed by this index.
|
java.util.Set<K> |
getKeys()
Retrieves the set of all keys.
|
void |
put(K key,
V value)
Adds the given key / value pair to the index.
|
void |
remove(K key,
V value)
Removes the given key / value pair from the index.
|
public void put(K key, V value)
key - key to be addedvalue - value to be addedpublic void remove(K key, V value)
key - key to be removedvalue - value to be removedpublic java.util.Set<V> find(K key)
Indexpublic java.util.Set<K> getKeys()
Index