Top Description Methods
com.sun.org.apache.xpath.internal.axes

public Interface ContextNodeList

Known Direct Implementers
com.sun.org.apache.xpath.internal.NodeSet
Imports
org.w3c.dom.Node, org.w3c.dom.traversal.NodeIterator

Classes who implement this interface can be a current node list, also refered to here as a context node list.

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

A clone of this object.
clone
()

Get a clone of this iterator.

public NodeIterator

Returns:

A clone of this iteration that has been reset.
cloneWithReset
()

Get a cloned Iterator that is reset to the start of the iteration.

public Node

Returns:

The current node, or null.
getCurrentNode
()

Get the current node.

public int

Returns:

The position of the current node in the current node list.
getCurrentPos
()

Get the current position, which is one less than the next nextNode() call will retrieve.

public int

Returns:

the index of the last node in this list.
getLast
()

Get the index of the last node in this list.

public boolean

Returns:

true if the iteration of this list has not yet begun.
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
The index to run to, or -1 if the iterator should be run to the end.
index
)

If an index is requested, NodeSetDTM will call this method to run the iterator to the index.

public void
setCurrentPos(int
Must be a valid index.
i
)

Set the current position in the node set.

public void
setLast(int
the index of the last node in this list.
last
)

Set the index of the last node in this list.

public void
setShouldCacheNodes(boolean
true if the nodes should be cached.
b
)

If setShouldCacheNodes(true) is called, then nodes will be cached.

public int

Returns:

The number of nodes in this node list.
size
()

Get the length of the list.

Method Detail

cloneback to summary
public Object clone() throws CloneNotSupportedException

Get a clone of this iterator. Be aware that this operation may be somewhat expensive.

Returns:Object

A clone of this object.

cloneWithResetback to summary
public NodeIterator cloneWithReset() throws CloneNotSupportedException

Get a cloned Iterator that is reset to the start of the iteration.

Returns:NodeIterator

A clone of this iteration that has been reset.

getCurrentNodeback to summary
public Node getCurrentNode()

Get the current node.

Returns:Node

The current node, or null.

getCurrentPosback to summary
public int getCurrentPos()

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.

Returns:int

The position of the current node in the current node list.

getLastback to summary
public int getLast()

Get the index of the last node in this list.

Returns:int

the index of the last node in this list.

isFreshback to summary
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.

Returns:boolean

true if the iteration of this list has not yet begun.

resetback to summary
public void reset()

Reset the iterator.

runToback to summary
public void runTo(int index)

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:int

The index to run to, or -1 if the iterator should be run to the end.

setCurrentPosback to summary
public void setCurrentPos(int i)

Set the current position in the node set.

Parameters
i:int

Must be a valid index.

setLastback to summary
public void setLast(int last)

Set the index of the last node in this list.

Parameters
last:int

the index of the last node in this list.

setShouldCacheNodesback to summary
public void setShouldCacheNodes(boolean b)

If setShouldCacheNodes(true) is called, then nodes will be cached. They are not cached by default.

Parameters
b:boolean

true if the nodes should be cached.

sizeback to summary
public int size()

Get the length of the list.

Returns:int

The number of nodes in this node list.