package configuration; import org.w3c.dom.Element; import org.w3c.dom.NodeList; import java.util.Iterator; import java.util.Spliterator; import java.util.function.Consumer; public class IterableElementList implements Iterable { private final NodeList nodes; public IterableElementList(NodeList nodes) { this.nodes = nodes; } @Override public Iterator iterator() { return new ElementListIterator(nodes); } @Override public void forEach(Consumer action) { Iterable.super.forEach(action); } @Override public Spliterator spliterator() { return Iterable.super.spliterator(); } }