public class EmptyIterator extends java.lang.Object implements SequenceIterator, ReversibleIterator, LastPositionFinder, GroundedIterator, LookaheadIterator, AtomizedValueIterator
Modifier | Constructor and Description |
---|---|
protected |
EmptyIterator()
Protected constructor
|
Modifier and Type | Method and Description |
---|---|
static EmptyIterator |
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.
|
GroundedValue |
getResidue()
Return a GroundedValue containing all the remaining items in the sequence returned by this
SequenceIterator, starting at the current position.
|
EmptyIterator |
getReverseIterator()
Get another iterator over the same items, in reverse order.
|
boolean |
hasNext()
Determine whether there are more items to come.
|
boolean |
isActuallyGrounded()
Ask if the iterator is actually grounded.
|
GroundedValue |
materialize()
Return a Value containing all the items in the sequence returned by this
SequenceIterator.
|
Item |
next()
Get the next item.
|
AtomicSequence |
nextAtomizedValue()
Deliver the atomic value that is next in the atomized result
|
static AtomicIterator |
ofAtomic()
Static method to get an empty AtomicIterator
|
static AxisIterator |
ofNodes()
Static method to get an empty AxisIterator
|
boolean |
supportsGetLength()
Ask whether this iterator supports use of the
LastPositionFinder.getLength() method. |
boolean |
supportsHasNext()
Ask whether the hasNext() method can be called.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, discharge
public static EmptyIterator getInstance()
public static EmptyIterator emptyIterator()
public AtomicSequence nextAtomizedValue()
nextAtomizedValue
in interface AtomizedValueIterator
public Item next()
next
in interface SequenceIterator
public boolean supportsGetLength()
LastPositionFinder
LastPositionFinder.getLength()
method. This
method should always be called before calling LastPositionFinder.getLength()
, because an iterator
that implements this interface may support use of LastPositionFinder.getLength()
in some situations
and not in otherssupportsGetLength
in interface LastPositionFinder
LastPositionFinder.getLength()
method can be called to determine the length
of the underlying sequence.public int getLength()
getLength
in interface LastPositionFinder
public EmptyIterator getReverseIterator()
getReverseIterator
in interface ReversibleIterator
public GroundedValue materialize()
materialize
in interface GroundedIterator
public GroundedValue getResidue()
GroundedIterator
getResidue
in interface GroundedIterator
public boolean supportsHasNext()
LookaheadIterator
supportsHasNext
in interface LookaheadIterator
LookaheadIterator.hasNext()
method is availablepublic boolean hasNext()
hasNext
in interface LookaheadIterator
public boolean isActuallyGrounded()
GroundedIterator
GroundedIterator.materialize()
or GroundedIterator.getResidue()
, because the iterator might
be grounded under some conditions and not others (usually when it delegates
to another iterator)isActuallyGrounded
in interface GroundedIterator
public static AxisIterator ofNodes()
public static AtomicIterator ofAtomic()
Copyright (c) 2004-2022 Saxonica Limited. All rights reserved.