Package net.sf.saxon.tree.linked
Class AttributeAxisIterator
- java.lang.Object
-
- net.sf.saxon.tree.linked.AttributeAxisIterator
-
- All Implemented Interfaces:
Closeable,AutoCloseable,SequenceIterator,AxisIterator,LookaheadIterator
final class AttributeAxisIterator extends Object implements AxisIterator, LookaheadIterator
AttributeAxisIterator is an enumeration of all the attribute nodes of an Element.
-
-
Constructor Summary
Constructors Constructor Description AttributeAxisIterator(ElementImpl node, NodeTest nodeTest)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()Test if there are mode nodes still to come.NodeInfonext()Get the next node in the iteration, or null if there are no more.booleansupportsHasNext()Ask whether the hasNext() method can be called.-
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
-
AttributeAxisIterator
AttributeAxisIterator(ElementImpl node, NodeTest nodeTest)
Constructor- Parameters:
node- : the element whose attributes are required. This may be any type of node, but if it is not an element the enumeration will be emptynodeTest- : condition to be applied to the names of the attributes selected
-
-
Method Detail
-
supportsHasNext
public boolean supportsHasNext()
Description copied from interface:LookaheadIteratorAsk whether the hasNext() method can be called. This method must be called before calling hasNext(), because some iterators implement this interface, but only support look-ahead under particular circumstances (this is usually because they delegate to another iterator)- Specified by:
supportsHasNextin interfaceLookaheadIterator- Returns:
- true if the
LookaheadIterator.hasNext()method is available
-
hasNext
public boolean hasNext()
Test if there are mode nodes still to come. ("elements" is used here in the sense of the Java enumeration class, not in the XML sense)- Specified by:
hasNextin interfaceLookaheadIterator- Returns:
- true if there are more items in the sequence
-
next
public NodeInfo next()
Get the next node in the iteration, or null if there are no more.- Specified by:
nextin interfaceAxisIterator- Specified by:
nextin interfaceSequenceIterator- Returns:
- the next item, or null if there are no more items. Once a call on next() has returned null, no further calls should be made. The preferred action for an iterator if subsequent calls on next() are made is to return null again, and all implementations within Saxon follow this rule.
-
-