public abstract class AbsAxis extends Object implements Iterator<Long>, Iterable<Long>
Provide standard Java iterator capability compatible with the new enhanced for loop available since Java 5.
All implementations must make sure to call super.hasNext() as the first thing in hasNext().
All users must make sure to call next() after hasNext() evaluated to true.
Constructor and Description |
---|
AbsAxis(INodeReadTrx paramRtx)
Bind axis step to transaction.
|
AbsAxis(INodeReadTrx paramRtx,
boolean paramIncludeSelf)
Bind axis step to transaction.
|
Modifier and Type | Method and Description |
---|---|
static int |
addAtomicToItemList(INodeReadTrx pRtx,
AtomicValue pVal)
Adding any AtomicVal to any ItemList staticly.
|
void |
close()
Closing the Transaction
|
ItemList |
getItemList()
Getting the ItemList.
|
INode |
getNode()
Getting the current node (including items from the ItemList)
|
protected long |
getStartKey()
Get start key.
|
abstract boolean |
hasNext() |
protected boolean |
isSelfIncluded()
Is self included?
|
Iterator<Long> |
iterator() |
boolean |
moveTo(long pKey)
Move cursor to a node by its node key.
|
Long |
next() |
void |
remove() |
void |
reset(long paramNodeKey)
Resetting the nodekey of this axis to a given nodekey.
|
protected long |
resetToLastKey()
Make sure the transaction points to the node after the last hasNext().
|
protected long |
resetToStartKey()
Make sure the transaction points to the node it started with.
|
public AbsAxis(INodeReadTrx paramRtx)
paramRtx
- transaction to operate withpublic AbsAxis(INodeReadTrx paramRtx, boolean paramIncludeSelf)
paramRtx
- transaction to operate withparamIncludeSelf
- determines if self is includedpublic void reset(long paramNodeKey)
paramNodeKey
- the nodekey where the reset should occur to.public boolean moveTo(long pKey)
pKey
- Key of node to select.public void close() throws TTException
TTException
public INode getNode()
protected final long resetToStartKey()
protected final long resetToLastKey()
protected final long getStartKey()
protected final boolean isSelfIncluded()
public ItemList getItemList()
public static int addAtomicToItemList(INodeReadTrx pRtx, AtomicValue pVal)
pRtx
- as keypVal
- to be addedCopyright © 2013. All Rights Reserved.