Class DiscriminationTreeIterators
- java.lang.Object
-
- de.learnlib.datastructure.discriminationtree.iterators.DiscriminationTreeIterators
-
public final class DiscriminationTreeIterators extends Object
Factory methods for several kinds of discrimination tree node iterators.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <N extends AbstractDTNode<?,?,?,N>>
Iterator<N>innerNodeIterator(N root)
Iterator that traverses all inner nodes (no leaves) of a subtree of a given discrimination tree node.static <N extends AbstractDTNode<?,?,?,N>>
Iterator<N>leafIterator(N root)
Iterator that traverses all leaves (no inner nodes) of a subtree of a given discrimination tree node.static <N extends AbstractDTNode<?,?,?,N>>
Iterator<N>nodeIterator(N root)
Iterator that traverses all nodes of a subtree of a given discrimination tree node.static <N extends AbstractDTNode<?,?,?,N>,D>
Iterator<D>transformingLeafIterator(N root, Function<? super N,D> transformer)
Iterator that traverses all leaves (no inner nodes) of a subtree of a given discrimination tree node.
-
-
-
Method Detail
-
nodeIterator
public static <N extends AbstractDTNode<?,?,?,N>> Iterator<N> nodeIterator(N root)
Iterator that traverses all nodes of a subtree of a given discrimination tree node.- Type Parameters:
N
- node type- Parameters:
root
- the root node, from which traversal should start
-
innerNodeIterator
public static <N extends AbstractDTNode<?,?,?,N>> Iterator<N> innerNodeIterator(N root)
Iterator that traverses all inner nodes (no leaves) of a subtree of a given discrimination tree node.- Type Parameters:
N
- node type- Parameters:
root
- the root node, from which traversal should start
-
leafIterator
public static <N extends AbstractDTNode<?,?,?,N>> Iterator<N> leafIterator(N root)
Iterator that traverses all leaves (no inner nodes) of a subtree of a given discrimination tree node.- Type Parameters:
N
- node type- Parameters:
root
- the root node, from which traversal should start
-
transformingLeafIterator
public static <N extends AbstractDTNode<?,?,?,N>,D> Iterator<D> transformingLeafIterator(N root, Function<? super N,D> transformer)
Iterator that traverses all leaves (no inner nodes) of a subtree of a given discrimination tree node. Additionally, allows to specify a transformer that is applied to the leaf nodes- Type Parameters:
N
- node type- Parameters:
root
- the root node, from which traversal should starttransformer
- the transformer that transforms iterated nodes
-
-