public class EmptyIterator<T extends Item<?>> extends java.lang.Object implements SequenceIterator<T>, ReversibleIterator<T>, LastPositionFinder, GroundedIterator<T>, LookaheadIterator<T>, UnfailingIterator<T>, AtomizedValueIterator<T>
Modifier and Type | Class and Description |
---|---|
static class |
EmptyIterator.OfAtomic
An empty iterator for use where a sequence of atomic values is required
|
static class |
EmptyIterator.OfNodes
An empty iterator for use where a sequence of nodes is required
|
ATOMIZING, GROUNDED, LAST_POSITION_FINDER, LOOKAHEAD
Modifier | Constructor and Description |
---|---|
protected |
EmptyIterator()
Protected constructor
|
Modifier and Type | Method and Description |
---|---|
static <T extends Item<?>> |
emptyIterator() |
static EmptyIterator |
getInstance()
Get an EmptyIterator, an iterator over an empty sequence.
|
int |
getLength()
Get the position of the last item in the sequence.
|
int |
getProperties()
Get properties of this iterator, as a bit-significant integer.
|
GroundedValue<T> |
getResidue()
Return a GroundedValue containing all the remaining items in the sequence returned by this
SequenceIterator, starting at the current position.
|
EmptyIterator<T> |
getReverseIterator()
Get another iterator over the same items, in reverse order.
|
boolean |
hasNext()
Determine whether there are more items to come.
|
GroundedValue<T> |
materialize()
Return a Value containing all the items in the sequence returned by this
SequenceIterator.
|
T |
next()
Get the next item.
|
AtomicSequence |
nextAtomizedValue()
Deliver the atomic value that is next in the atomized result
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
firstWith, forEach, toGroundedValue, toList
close, forEachOrFail
public static EmptyIterator getInstance()
public static <T extends Item<?>> EmptyIterator<T> emptyIterator()
public AtomicSequence nextAtomizedValue()
nextAtomizedValue
in interface AtomizedValueIterator<T extends Item<?>>
public T next()
next
in interface SequenceIterator<T extends Item<?>>
next
in interface UnfailingIterator<T extends Item<?>>
public int getLength()
getLength
in interface LastPositionFinder
public EmptyIterator<T> getReverseIterator()
getReverseIterator
in interface ReversibleIterator<T extends Item<?>>
public int getProperties()
getProperties
in interface SequenceIterator<T extends Item<?>>
SequenceIterator.GROUNDED
, SequenceIterator.LAST_POSITION_FINDER
,
and SequenceIterator.LOOKAHEAD
. It is always
acceptable to return the value zero, indicating that there are no known special properties.
It is acceptable for the properties of the iterator to change depending on its state.public GroundedValue<T> materialize()
materialize
in interface SequenceIterator<T extends Item<?>>
materialize
in interface GroundedIterator<T extends Item<?>>
public GroundedValue<T> getResidue()
GroundedIterator
getResidue
in interface GroundedIterator<T extends Item<?>>
public boolean hasNext()
hasNext
in interface LookaheadIterator<T extends Item<?>>
Copyright (c) 2004-2020 Saxonica Limited. All rights reserved.