Class AttributeEnumeration

    • 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

      • moveNext

        public boolean moveNext()
        Move to the next node in the iteration.
        Specified by:
        moveNext in interface AxisIterator
        Overrides:
        moveNext in class AxisIteratorImpl
        Returns:
        true if there is a next node, false if the end of the sequence has been reached
      • next

        public NodeInfo next()
        Get the next item in the sequence.
        Returns:
        the next Item. If there are no more nodes, return null.
      • atomize

        public Value atomize()
                      throws XPathException
        Return the atomized value of the current node.
        Specified by:
        atomize in interface AxisIterator
        Overrides:
        atomize in class AxisIteratorImpl
        Returns:
        the atomized value.
        Throws:
        java.lang.NullPointerException - if there is no current node
        XPathException - if the current node cannot be atomized, for example because it is an element node with element-only content.
      • getStringValue

        public java.lang.CharSequence getStringValue()
        Return the string value of the current node.
        Specified by:
        getStringValue in interface AxisIterator
        Overrides:
        getStringValue in class AxisIteratorImpl
        Returns:
        the string value, as an instance of CharSequence.
        Throws:
        java.lang.NullPointerException - if there is no current node
      • getAnother

        public AxisIterator getAnother()
        Get another iteration over the same nodes
        Returns:
        a new iterator over the same sequence