public class KeyTupleBTreeCursor<K,V> extends AbstractTupleCursor<K,V>
Constructor and Description |
---|
KeyTupleBTreeCursor(BTree btree,
K key,
Comparator<V> comparator)
Creates a Cursor over the tuples of a JDBM BTree.
|
Modifier and Type | Method and Description |
---|---|
void |
after(Tuple<K,V> element) |
void |
afterKey(K key)
An alternative to calling after(Tuple) which often may require
wrapping a key in a newly created Tuple object that may be unnecessary.
|
void |
afterLast() |
void |
afterValue(K key,
V value)
An alternative to calling after(Tuple) which often may require
wrapping a key and a value in a newly created Tuple object that may be
unnecessary.
|
boolean |
available() |
void |
before(Tuple<K,V> element)
Positions this Cursor over the same keys before the value of the
supplied valueTuple.
|
void |
beforeFirst() |
void |
beforeKey(K key)
An alternative to calling before(Tuple) which often may require
wrapping a key in a newly created Tuple object that may be unnecessary.
|
void |
beforeValue(K key,
V value)
An alternative to calling before(Tuple) which often may require
wrapping a key and a value in a newly created Tuple object that may be
unnecessary.
|
boolean |
first() |
Tuple<K,V> |
get() |
boolean |
isElementReused() |
boolean |
last() |
boolean |
next() |
boolean |
previous() |
checkNotClosed, close, close, isClosed, iterator, setClosureMonitor
public KeyTupleBTreeCursor(BTree btree, K key, Comparator<V> comparator) throws Exception
btree
- the JDBM BTree to build a Cursor overkey
- the constant key for which values are returnedcomparator
- the Comparator used to determine key orderingException
- of there are problems accessing the BTreepublic boolean available()
public void beforeKey(K key) throws Exception
TupleCursor
key
- the key to advance just beforeException
- if there are faults peforming this operationpublic void afterKey(K key) throws Exception
TupleCursor
key
- the key to advance just after the last valueException
- if there are faults peforming this operationpublic void beforeValue(K key, V value) throws Exception
TupleCursor
key
- the key of the value to advance just beforevalue
- the value to advance just beforeUnsupportedOperationException
- if duplicate keys not supporrtedException
- if there are faults peforming this operationpublic void afterValue(K key, V value) throws Exception
TupleCursor
key
- the key of the value to advance just aftervalue
- the value to advance just afterUnsupportedOperationException
- if duplicate keys not supporrtedException
- if there are faults peforming this operationpublic void before(Tuple<K,V> element) throws Exception
element
- the valueTuple who's value is used to position this CursorException
- if there are failures to position the Cursorpublic boolean isElementReused()
Copyright © 2003-2012 Apache Software Foundation. All Rights Reserved.