Class IterableNodeList

java.lang.Object
org.xmlunit.util.IterableNodeList
All Implemented Interfaces:
Iterable<Node>

public final class IterableNodeList extends Object implements Iterable<Node>
Provides an iterable view to a NodeList, the Iterator that can be obtained from this Iterable will be read-only.
  • Constructor Details

    • IterableNodeList

      public IterableNodeList(NodeList nl)
      Wraps the NodeList.
      Parameters:
      nl - list to wrap
  • Method Details

    • iterator

      public Iterator<Node> iterator()
      Specified by:
      iterator in interface Iterable<Node>
    • asList

      public static List<Node> asList(NodeList l)
      Turns the NodeList into a list.
      Parameters:
      l - the NodeList to convert
      Returns:
      a list of Nodes