public class KeyTupleArrayCursor<K,V> extends AbstractTupleCursor<K,V>
Constructor and Description |
---|
KeyTupleArrayCursor(ArrayTree<V> arrayTree,
K key)
Creates a Cursor over the tuples of an ArrayTree.
|
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 element Tuple.
|
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public 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–2015 The Apache Software Foundation. All rights reserved.