Package com.saxonica.ee.stream.om
Class AttributeIterator
- java.lang.Object
-
- com.saxonica.ee.stream.om.AttributeIterator
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,SequenceIterator
,AxisIterator
,LookaheadIterator
public final class AttributeIterator extends java.lang.Object implements AxisIterator, LookaheadIterator
AttributeIterator iterates over all the attribute nodes of a streamed Element node.
-
-
Constructor Summary
Constructors Constructor Description AttributeIterator(FleetingElementNode element, AttributeMap attributes)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
Test if there are more nodes still to come.NodeInfo
next()
Get the next node in the iteration, or null if there are no more.boolean
supportsHasNext()
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, discharge
-
-
-
-
Constructor Detail
-
AttributeIterator
public AttributeIterator(FleetingElementNode element, AttributeMap attributes)
Constructor- Parameters:
element
- the element whose attributes are required.
-
-
Method Detail
-
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 more 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
public NodeInfo 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.
-
-