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.Decisions on each step how to continue with traversing the Trie.


Nested Class Summary
static class Cursor.Decision
          The Cursor.Decision tells the Cursor what to do on each step while traversing the Trie.
 
Method Summary
 Cursor.Decision select(java.util.Map.Entry<? extends K,? extends V> entry)
          Called for each Map.Entry in the Trie.
 

Method Detail

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.