Class NodeListIterable

java.lang.Object
eu.europa.ec.taxud.validation.utils.NodeListIterable
All Implemented Interfaces:
Iterable<Node>

public class NodeListIterable extends Object implements Iterable<Node>
NodeListIterable wraps a NodeList to implement Iterable and allow the use of the convenient for-each syntax.
  • Constructor Details

    • NodeListIterable

      public NodeListIterable(NodeList nodeListArg)
      Creates a new wrapper.
      Parameters:
      nodeListArg - The list to wrap.
  • Method Details

    • iterator

      public Iterator<Node> iterator()
      Return iterator on node list.
      Specified by:
      iterator in interface Iterable<Node>
      Returns:
      Iterator Iterator on nodes.
    • getLength

      public int getLength()
      Returns the number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive.
      Returns:
      the number of nodes.
      See Also:
    • isEmpty

      public boolean isEmpty()
      Is empty boolean.
      Returns:
      true is the nodeList is null or empty.