| org.apache.xpath.axes.ContextNodeList
All known Subclasses: org.apache.xpath.NodeSet,
ContextNodeList | public interface ContextNodeList (Code) | | Classes who implement this interface can be a
current node list,
also refered to here as a context node list.
|
Method Summary | |
public Object | clone() Get a clone of this iterator. | public NodeIterator | cloneWithReset() Get a cloned Iterator that is reset to the start of the iteration. | public Node | getCurrentNode() Get the current node. | public int | getCurrentPos() Get the current position, which is one less than
the next nextNode() call will retrieve. | public int | getLast() Get the index of the last node in this list. | public boolean | isFresh() Tells if this NodeSetDTM is "fresh", in other words, if
the first nextNode() that is called will return the
first node in the set. | public void | reset() Reset the iterator. | public void | runTo(int index) If an index is requested, NodeSetDTM will call this method
to run the iterator to the index. | public void | setCurrentPos(int i) Set the current position in the node set. | public void | setLast(int last) Set the index of the last node in this list. | public void | setShouldCacheNodes(boolean b) If setShouldCacheNodes(true) is called, then nodes will
be cached. | public int | size() Get the length of the list. |
getCurrentPos | public int getCurrentPos()(Code) | | Get the current position, which is one less than
the next nextNode() call will retrieve. i.e. if
you call getCurrentPos() and the return is 0, the next
fetch will take place at index 1.
The position of thecurrent nodein the current node list. |
getLast | public int getLast()(Code) | | Get the index of the last node in this list.
the index of the last node in this list. |
isFresh | public boolean isFresh()(Code) | | Tells if this NodeSetDTM is "fresh", in other words, if
the first nextNode() that is called will return the
first node in the set.
true if the iteration of this list has not yet begun. |
reset | public void reset()(Code) | | Reset the iterator.
|
runTo | public void runTo(int index)(Code) | | If an index is requested, NodeSetDTM will call this method
to run the iterator to the index. By default this sets
m_next to the index. If the index argument is -1, this
signals that the iterator should be run to the end.
Parameters: index - The index to run to, or -1 if the iterator should be runto the end. |
setCurrentPos | public void setCurrentPos(int i)(Code) | | Set the current position in the node set.
Parameters: i - Must be a valid index. |
setLast | public void setLast(int last)(Code) | | Set the index of the last node in this list.
Parameters: last - the index of the last node in this list. |
setShouldCacheNodes | public void setShouldCacheNodes(boolean b)(Code) | | If setShouldCacheNodes(true) is called, then nodes will
be cached. They are not cached by default.
Parameters: b - true if the nodes should be cached. |
size | public int size()(Code) | | Get the length of the list.
The number of nodes in this node list. |
|
|