net.sf.saxon.tinytree

Class AttributeEnumeration

final class AttributeEnumeration extends AxisIteratorImpl

AttributeEnumeration is an iterator over all the attribute nodes of an Element.
Constructor Summary
AttributeEnumeration(TinyTree tree, int element, NodeTest nodeTest)
Constructor.
Method Summary
Valueatomize()
Return the atomized value of the current node.
Itemcurrent()
Get the current node in the sequence.
SequenceIteratorgetAnother()
Get another iteration over the same nodes
CharSequencegetStringValue()
Return the string value of the current node.
booleanmoveNext()
Move to the next node in the iteration.
Itemnext()
Get the next item in the sequence.

Constructor Detail

AttributeEnumeration

AttributeEnumeration(TinyTree tree, int element, NodeTest nodeTest)
Constructor. Note: this constructor will only be called if the relevant node is an element and if it has one or more attributes. Otherwise an EmptyEnumeration will be constructed instead.

Parameters: tree: the containing TinyTree element: the node number of the element whose attributes are required nodeTest: condition to be applied to the names of the attributes selected

Method Detail

atomize

public Value atomize()
Return the atomized value of the current node.

Returns: the atomized value.

Throws: NullPointerException if there is no current node

current

public Item current()
Get the current node in the sequence.

Returns: the node returned by the most recent call on next(), or the node on which we positioned using moveNext()

getAnother

public SequenceIterator getAnother()
Get another iteration over the same nodes

getStringValue

public CharSequence getStringValue()
Return the string value of the current node.

Returns: the string value, as an instance of CharSequence.

Throws: NullPointerException if there is no current node

moveNext

public boolean moveNext()
Move to the next node in the iteration.

next

public Item next()
Get the next item in the sequence.

Returns: the next Item. If there are no more nodes, return null.