Package com.vaadin.browserless.internal
Class DepthFirstTreeIterator<T>
java.lang.Object
com.vaadin.browserless.internal.DepthFirstTreeIterator<T>
- Type Parameters:
T- the type of the tree nodes.
- All Implemented Interfaces:
Iterator<T>
Walks the child tree, depth-first: first the node, then its descendants, then
its next sibling.
For internal use only. May be renamed or removed in a future release.
-
Constructor Details
-
DepthFirstTreeIterator
Creates the iterator.- Parameters:
root- start here.children- fetches children of given node.
-
-
Method Details
-
hasNext
public boolean hasNext() -
next
-
remove
public void remove() -
walk
public static Iterable<com.vaadin.flow.component.Component> walk(com.vaadin.flow.component.Component component) Walks the component child tree, depth-first: first the component, then its descendants, then its next sibling.- Parameters:
component- the root component.- Returns:
- the iterable over the component and all of its descendants.
-