org.ardverk.collection
Interface Cursor<K,V>
public interface Cursor<K,V>
A Cursor
can be used to traverse a Trie
, visit each node
step by step and make Cursor.Decision
s on each step how to continue with
traversing the Trie
.
select
Cursor.Decision select(java.util.Map.Entry<? extends K,? extends V> entry)
- Called for each
Map.Entry
in the Trie
. Return
Cursor.Decision.EXIT
to finish the Trie
operation,
Cursor.Decision.CONTINUE
to go to the next Map.Entry
,
Cursor.Decision.REMOVE
to remove the Map.Entry
and
continue iterating or Cursor.Decision.REMOVE_AND_EXIT
to
remove the Map.Entry
and stop iterating.
Note: Not all operations support Cursor.Decision.REMOVE
.
Copyright © 2005-2009 Roger Kapsi, Sam Berlin. All Rights Reserved.