Package net.sf.saxon.tree.iter
Class IncrementalIterator
- java.lang.Object
-
- net.sf.saxon.tree.iter.IncrementalIterator
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,SequenceIterator
,AxisIterator
public class IncrementalIterator extends java.lang.Object implements AxisIterator
This class implements an AxisIterator by providing a start item, and a function that selects the next item as a function of the previous item.
-
-
Constructor Summary
Constructors Constructor Description IncrementalIterator(NodeInfo start, java.util.function.Function<NodeInfo,NodeInfo> stepper)
Create an IncrementalIterator
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NodeInfo
next()
Get the next item in the sequence-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sf.saxon.om.SequenceIterator
close
-
-
-
-
Constructor Detail
-
IncrementalIterator
public IncrementalIterator(NodeInfo start, java.util.function.Function<NodeInfo,NodeInfo> stepper)
Create an IncrementalIterator- Parameters:
start
- the first item to be returned by the iteratorstepper
- a function that computes the next item, given the current item, or returns null at the end of the sequence.
-
-
Method Detail
-
next
public NodeInfo next()
Get the next item in the sequence- Specified by:
next
in interfaceAxisIterator
- Specified by:
next
in interfaceSequenceIterator
- Returns:
- the next item, or null if there are no more items to be returned.
-
-