net.sf.saxon.tree.iter
Class EmptyAxisIterator<T extends NodeInfo>

java.lang.Object
  extended by net.sf.saxon.tree.iter.EmptyIterator<T>
      extended by net.sf.saxon.tree.iter.EmptyAxisIterator<T>
All Implemented Interfaces:
LastPositionFinder<T>, SequenceIterator<T>, AxisIterator<T>, GroundedIterator<T>, LookaheadIterator<T>, ReversibleIterator<T>, UnfailingIterator<T>

public class EmptyAxisIterator<T extends NodeInfo>
extends EmptyIterator<T>
implements AxisIterator<T>

An AxisIterator over an empty sequence


Field Summary
 
Fields inherited from interface net.sf.saxon.om.SequenceIterator
GROUNDED, LAST_POSITION_FINDER, LOOKAHEAD
 
Constructor Summary
EmptyAxisIterator()
           
 
Method Summary
static
<T extends NodeInfo>
EmptyAxisIterator<T>
emptyAxisIterator()
           
 EmptyAxisIterator<T> getAnother()
          Get another iterator over the same items, positioned at the start.
 AxisIterator iterateAxis(byte axis, NodeTest test)
          Return an iterator over an axis, starting at the current node.
 boolean moveNext()
          Move to the next node, without returning it.
 
Methods inherited from class net.sf.saxon.tree.iter.EmptyIterator
atomize, close, current, emptyIterator, getInstance, getLength, getProperties, getReverseIterator, getStringValue, hasNext, materialize, next, position
 
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.tree.iter.AxisIterator
atomize, current, getStringValue, next
 
Methods inherited from interface net.sf.saxon.tree.iter.UnfailingIterator
position
 
Methods inherited from interface net.sf.saxon.om.SequenceIterator
close, getProperties
 

Constructor Detail

EmptyAxisIterator

public EmptyAxisIterator()
Method Detail

emptyAxisIterator

public static <T extends NodeInfo> EmptyAxisIterator<T> emptyAxisIterator()

iterateAxis

public AxisIterator iterateAxis(byte axis,
                                NodeTest test)
Return an iterator over an axis, starting at the current node.

Specified by:
iterateAxis in interface AxisIterator<T extends NodeInfo>
Parameters:
axis - the axis to iterate over, using a constant such as Axis.CHILD
test - a predicate to apply to the nodes before returning them.
Returns:
an iterator over an axis, starting at the current node
Throws:
NullPointerException - if there is no current node

getAnother

public EmptyAxisIterator<T> getAnother()
Get another iterator over the same items, positioned at the start.

Specified by:
getAnother in interface SequenceIterator<T extends NodeInfo>
Specified by:
getAnother in interface AxisIterator<T extends NodeInfo>
Specified by:
getAnother in interface UnfailingIterator<T extends NodeInfo>
Overrides:
getAnother in class EmptyIterator<T extends NodeInfo>
Returns:
another iterator over an empty sequence (in practice, it returns the same iterator each time)

moveNext

public boolean moveNext()
Move to the next node, without returning it. Returns true if there is a next node, false if the end of the sequence has been reached. After calling this method, the current node may be retrieved using the current() function.

Specified by:
moveNext in interface AxisIterator<T extends NodeInfo>
Returns:
true if there is a next node, false if the end of the sequence has been reached


Copyright (c) 2004-2011 Saxonica Limited. All rights reserved.