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
AttributeAxisIterator is an enumeration of all the attribute nodes of an Element.
-
Constructor Details
-
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 Details
-
supportsHasNext
public boolean supportsHasNext()Description copied from interface:LookaheadIterator
Ask 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:
supportsHasNext
in 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:
hasNext
in interfaceLookaheadIterator
- Returns:
- true if there are more items in the sequence
-
next
Get the next node in the iteration, or null if there are no more.- Specified by:
next
in interfaceAxisIterator
- Specified by:
next
in 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.
-