net.sf.eos.trie
Interface Trie.Cursor<K,V>
- Type Parameters:
K
- Key TypeV
- Key Value
- Enclosing interface:
- Trie<K,V>
public static interface Trie.Cursor<K,V>
An interface used by a Trie
. A Trie
selects items by
closeness and passes the items to the Cursor
. You can then
decide what to do with the key-value pair and the return value
from select(java.util.Map.Entry)
tells the Trie
what to do next.
Cursor
returns status/selection status might be:
Return Value | Status |
EXIT | Finish the Trie operation |
CONTINUE | Look at the next element in the traversal |
REMOVE_AND_EXIT | Remove the entry and stop iterating |
REMOVE | Remove the entry and continue iterating |
Note: Trie.select(Object, net.sf.eos.trie.Trie.Cursor)
does
not support REMOVE
.
select
Trie.Cursor.SelectStatus select(Map.Entry<? extends K,? extends V> entry)
- Notification that the Trie is currently looking at the given entry.
Return
EXIT
to finish the Trie operation,
CONTINUE
to look at the next entry, REMOVE
to remove the entry and continue iterating, or
REMOVE_AND_EXIT
to remove the entry and stop iterating.
Not all operations support REMOVE
.
Copyright © 2008. All Rights Reserved.