org.fusesource.hawtdb.api
Interface SortedIndex<Key,Value>
- All Superinterfaces:
- Index<Key,Value>, java.lang.Iterable<java.util.Map.Entry<Key,Value>>
public interface SortedIndex<Key,Value>
- extends Index<Key,Value>, java.lang.Iterable<java.util.Map.Entry<Key,Value>>
Provides Key/Value storage and retrieval.
- Author:
- Hiram Chirino
iterator
java.util.Iterator<java.util.Map.Entry<Key,Value>> iterator()
- Specified by:
iterator
in interface java.lang.Iterable<java.util.Map.Entry<Key,Value>>
- Returns:
-
- Throws:
java.io.IOException
iterator
java.util.Iterator<java.util.Map.Entry<Key,Value>> iterator(Predicate<Key> predicate)
- Returns:
-
- Throws:
java.io.IOException
iterator
java.util.Iterator<java.util.Map.Entry<Key,Value>> iterator(Key initialKey)
- Parameters:
initialKey
-
- Returns:
visit
void visit(IndexVisitor<Key,Value> visitor)
- Traverses the visitor over the stored entries in this index. The visitor can control
which keys and values are visited.
- Parameters:
visitor
-
getFirst
java.util.Map.Entry<Key,Value> getFirst()
- Returns:
- the first key/value pair in the index or null if empty.
getLast
java.util.Map.Entry<Key,Value> getLast()
- Returns:
- the last key/value pair in the index or null if empty.
Copyright © 2009-2011 FuseSource, Corp.. All Rights Reserved.