public class XdmSequenceIterator<T extends XdmItem>
extends java.lang.Object
implements java.util.Iterator<T>
This class implements the standard Java Iterator interface.
Because the Iterator
interface does not define any checked
exceptions, the hasNext()
method of this iterator throws an unchecked
exception if a dynamic error occurs while evaluating the expression. Applications
wishing to control error handling should take care to catch this exception.
Modifier | Constructor and Description |
---|---|
protected |
XdmSequenceIterator(SequenceIterator base) |
|
XdmSequenceIterator(UnfailingIterator base) |
Modifier and Type | Method and Description |
---|---|
void |
close()
The close() method should be called to release resources if the caller wants to stop reading
data before reaching the end.
|
boolean |
hasNext()
Returns true if the iteration has more elements.
|
T |
next()
Returns the next element in the iteration.
|
static XdmSequenceIterator<XdmAtomicValue> |
ofAtomicValues(UnfailingIterator<? extends AtomicValue> base) |
protected static XdmSequenceIterator<XdmNode> |
ofNode(XdmNode node) |
static XdmSequenceIterator<XdmNode> |
ofNodes(AxisIterator base) |
void |
remove()
Not supported on this implementation.
|
XdmStream<T> |
stream()
Convert this iterator to a Stream
|
protected XdmSequenceIterator(SequenceIterator base)
public XdmSequenceIterator(UnfailingIterator base)
public static XdmSequenceIterator<XdmNode> ofNodes(AxisIterator base)
public static XdmSequenceIterator<XdmAtomicValue> ofAtomicValues(UnfailingIterator<? extends AtomicValue> base)
protected static XdmSequenceIterator<XdmNode> ofNode(XdmNode node)
public boolean hasNext() throws SaxonApiUncheckedException
hasNext
in interface java.util.Iterator<T extends XdmItem>
SaxonApiUncheckedException
- if a dynamic error occurs during XPath evaluation that
is detected at this point.public T next()
hasNext()
method returns false will
return each element in the underlying collection exactly once.public void remove()
public void close()
Copyright (c) 2004-2020 Saxonica Limited. All rights reserved.