@Override public Iterator<HTMLElement> iterator() { return Elements.iterator(elements); } }
/** Returns an iterable collection for the child nodes of the given parent node. */ public static Iterable<Node> children(Node parent) { return () -> iterator(parent); }
/** Returns an iterable collection for the child elements of the given parent element. */ public static Iterable<HTMLElement> children(HTMLElement parent) { return () -> iterator(parent); }
/** Returns an iterable collection for the elements in the given array-like. */ public static <E> Iterable<E> elements(JsArrayLike<E> nodes) { return () -> iterator(nodes); }
/** Returns a stream for the child nodes of the given parent node. */ public static Stream<Node> stream(Node parent) { if (parent == null) { return Stream.empty(); } else { return StreamSupport.stream(spliteratorUnknownSize(iterator(parent), 0), false); } }
/** Returns a stream for the elements in the given array-like. */ public static <E> Stream<E> stream(JsArrayLike<E> nodes) { if (nodes == null) { return Stream.empty(); } else { return StreamSupport.stream(spliteratorUnknownSize(iterator(nodes), 0), false); } }
/** Returns a stream for the child elements of the given parent element. */ public static Stream<HTMLElement> stream(HTMLElement parent) { if (parent == null) { return Stream.empty(); } else { return StreamSupport.stream(spliteratorUnknownSize(iterator(parent), 0), false); } }