Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.xpath.axes
Interface ContextNodeList

All Known Implementing Classes:
  LocPathIterator, NodeSet, UnionPathIterator, XStatement

public interface ContextNodeList

Method Summary
`java.lang.Object` | `clone()`
`NodeIterator` | `cloneWithReset()` Get a cloned Iterator.
`Node` | `getCurrentNode()`
`int` | `getCurrentPos()` Get the current position, which is one less than the next nextNode() call will retreave.
`boolean` | `isFresh()` Tells if this NodeSet is "fresh", in other words, if the first nextNode() that is called will return the first node in the set.
`void` | `reset()` Reset the iterator.
`void` | `runTo(int index)` If an index is requested, NodeSet will call this method to run the iterator to the index.
`void` | `setCurrentPos(int i)` Set the current position in the node set.
`void` | `setShouldCacheNodes(boolean b)` If setShouldCacheNodes(true) is called, then nodes will be cached.
`int` | `size()` Get the length of the list.

Method Detail

### getCurrentNode

    public Node getCurrentNode()

### getCurrentPos

    public int getCurrentPos()

  Get the current position, which is one less than the next nextNode() call will retreave. i.e. if you call getCurrentPos() and the return is 0, the next fetch will take place at index 1.

### reset

    public void reset()

  Reset the iterator.

### setShouldCacheNodes

    public void setShouldCacheNodes(boolean b)

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

### runTo

    public void runTo(int index)

  If an index is requested, NodeSet 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.

### setCurrentPos

    public void setCurrentPos(int i)

  Set the current position in the node set.
  Parameters:
    `i` - Must be a valid index.

### size

    public int size()

  Get the length of the list.

### isFresh

    public boolean isFresh()

  Tells if this NodeSet is "fresh", in other words, if the first nextNode() that is called will return the first node in the set.

### cloneWithReset

    public NodeIterator cloneWithReset()
                                throws java.lang.CloneNotSupportedException

  Get a cloned Iterator.

### clone

    public java.lang.Object clone()
                           throws java.lang.CloneNotSupportedException

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000 Apache XML Project. All Rights Reserved.