A - The type of valuespublic interface JOTreeNodeReadableType<A>
| Modifier and Type | Method and Description |
|---|---|
Collection<JOTreeNodeReadableType<A>> |
childrenReadable() |
<T> void |
forEachBreadthFirst(T context,
JOTreeNodeForEachFunctionType<A,T> f)
Visit each node in the tree in breadth-first order.
|
<T> void |
forEachDepthFirst(T context,
JOTreeNodeForEachFunctionType<A,T> f)
Visit each node in the tree in depth-first order.
|
boolean |
isDescendantOf(JOTreeNodeReadableType<A> other) |
boolean |
isDetachAllowed() |
default boolean |
isRoot() |
<T,B> JOTreeNodeType<B> |
mapBreadthFirst(T context,
JOTreeNodeMapFunctionType<A,T,B> f)
Visit each node in the tree in breadth-first order.
|
<T,B> JOTreeNodeType<B> |
mapDepthFirst(T context,
JOTreeNodeMapFunctionType<A,T,B> f)
Visit each node in the tree in depth-first order.
|
Optional<JOTreeNodeReadableType<A>> |
parentReadable() |
A |
value() |
boolean isDetachAllowed()
true iff this node may be detached from its parentA value()
default boolean isRoot()
true iff this node is a root nodeOptional<JOTreeNodeReadableType<A>> parentReadable()
Collection<JOTreeNodeReadableType<A>> childrenReadable()
boolean isDescendantOf(JOTreeNodeReadableType<A> other)
other - A nodetrue iff this node is a descendant of other<T> void forEachDepthFirst(T context,
JOTreeNodeForEachFunctionType<A,T> f)
Visit each node in the tree in depth-first order.
The function allows for the use of a context value. This is useful for avoiding the use of capturing lambdas, reducing GC pressure.
T - The type of context valuescontext - A context value passed to each application of ff - A function used to receive each node<T> void forEachBreadthFirst(T context,
JOTreeNodeForEachFunctionType<A,T> f)
Visit each node in the tree in breadth-first order.
The function allows for the use of a context value. This is useful for avoiding the use of capturing lambdas, reducing GC pressure.
T - The type of context valuescontext - A context value passed to each application of ff - A function used to receive each node<T,B> JOTreeNodeType<B> mapDepthFirst(T context, JOTreeNodeMapFunctionType<A,T,B> f)
Visit each node in the tree in depth-first order.
The function allows for the use of a context value. This is useful for avoiding the use of capturing lambdas, reducing GC pressure.
T - The type of context valuesB - The type of values in the returned treecontext - A context value passed to each application of ff - A function used to receive each nodeB<T,B> JOTreeNodeType<B> mapBreadthFirst(T context, JOTreeNodeMapFunctionType<A,T,B> f)
Visit each node in the tree in breadth-first order.
The function allows for the use of a context value. This is useful for avoiding the use of capturing lambdas, reducing GC pressure.
T - The type of context valuesB - The type of values in the returned treecontext - A context value passed to each application of ff - A function used to receive each nodeBCopyright © 2017 <code@io7m.com> http://io7m.com