Class TreeIterator<N>
- java.lang.Object
-
- com.vladsch.flexmark.tree.iteration.TreeIterator<N>
-
public class TreeIterator<N> extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.function.Predicate<java.lang.Object>FALSEstatic org.slf4j.LoggerLOGstatic org.slf4j.LoggerLOG_INFOstatic org.slf4j.LoggerLOG_TRACEprivate IterationConditions<N>myConstraintsprotected java.util.function.Predicate<? super N>myFilterprivate java.util.function.Predicate<? super N>myRecursionstatic java.util.function.Predicate<java.lang.Object>NOT_NULLstatic java.util.function.Predicate<java.lang.Object>TRUE
-
Constructor Summary
Constructors Constructor Description TreeIterator(IterationConditions<N> constraints)TreeIterator(IterationConditions<N> constraints, java.util.function.Predicate<? super N> filter)TreeIterator(IterationConditions<N> constraints, java.util.function.Predicate<? super N> filter, java.util.function.Predicate<? super N> recursion)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull TreeIterator<N>aborted()<T,R>
voiddoLoop(N element, @NotNull ValueIterationAdapter<? super N,T> adapter, @NotNull VoidIterationConsumer<? super T> consumer)voiddoLoop(N element, @NotNull VoidIterationConsumer<? super N> consumer)<T,R>
RdoLoop(N element, R defaultValue, @NotNull ValueIterationAdapter<? super N,T> adapter, @NotNull ValueIterationConsumer<? super T,R> consumer)<R> RdoLoop(N element, R defaultValue, @NotNull ValueIterationConsumer<? super N,R> consumer)static <N> @NotNull java.util.function.Predicate<N>FALSE()@NotNull TreeIterator<N>filter(@NotNull java.lang.Class<? super N> clazz)<F> @NotNull TreeIterator<N>filter(@NotNull java.lang.Class<F> clazz, @NotNull java.util.function.Predicate<? super F> predicate)@NotNull TreeIterator<N>filter(@NotNull java.util.function.Predicate<? super N> predicate)@NotNull TreeIterator<N>filterOut(@NotNull java.lang.Class<? super N> clazz)<F> @NotNull TreeIterator<N>filterOut(@NotNull java.lang.Class<F> clazz, @NotNull java.util.function.Predicate<? super F> predicate)@NotNull TreeIterator<N>filterOut(@NotNull java.util.function.Predicate<? super N> predicate)@NotNull IterationConditions<N>getConstraints()java.util.function.Predicate<? super N>getFilter()@NotNull java.util.function.Predicate<N>getPredicate(@NotNull java.lang.Class<? super N> clazz)<F> @NotNull java.util.function.Predicate<N>getPredicate(@NotNull java.lang.Class<F> clazz, @NotNull java.util.function.Predicate<? super F> predicate)java.util.function.Predicate<? super N>getRecursion()<T,R>
VoidIterationiterate(N element, @NotNull ValueIterationAdapter<? super N,T> adapter, @NotNull VoidIterationConsumer<? super T> consumer)<R> VoidIterationiterate(N element, @NotNull VoidIterationConsumer<? super N> consumer)<T,R>
ValueIteration<R>iterate(N element, R defaultValue, @NotNull ValueIterationAdapter<? super N,T> adapter, @NotNull ValueIterationConsumer<? super T,R> consumer)<R> ValueIteration<R>iterate(N element, R defaultValue, @NotNull ValueIterationConsumer<? super N,R> consumer)@NotNull TreeIterator<N>modifiedCopy(@NotNull IterationConditions<N> constraints, @NotNull java.util.function.Predicate<? super N> filter, @NotNull java.util.function.Predicate<? super N> recursion)@NotNull TreeIterator<N>nonRecursive()@NotNull TreeIterator<N>noRecurse(@NotNull java.lang.Class<? super N> clazz)<F> @NotNull TreeIterator<N>noRecurse(@NotNull java.lang.Class<F> clazz, @NotNull java.util.function.Predicate<? super F> predicate)@NotNull TreeIterator<N>noRecurse(@NotNull java.util.function.Predicate<? super N> predicate)static <N> @NotNull TreeIterator<N>of(@NotNull IterationConditions<N> constraints)static <N> @NotNull TreeIterator<N>of(@NotNull IterationConditions<N> constraints, @NotNull java.util.function.Predicate<? super N> filter)static <N> @NotNull TreeIterator<N>of(@NotNull IterationConditions<N> constraints, @NotNull java.util.function.Predicate<? super N> filter, @NotNull java.util.function.Predicate<? super N> recursion)@NotNull TreeIterator<N>recurse(@NotNull java.lang.Class<? super N> clazz)<F> @NotNull TreeIterator<N>recurse(@NotNull java.lang.Class<F> clazz, @NotNull java.util.function.Predicate<? super F> predicate)@NotNull TreeIterator<N>recurse(@NotNull java.util.function.Predicate<? super N> predicate)@NotNull TreeIterator<N>recursive()@NotNull TreeIterator<N>reversed()static <N> @NotNull java.util.function.Predicate<N>TRUE()
-
-
-
Field Detail
-
LOG
public static final org.slf4j.Logger LOG
-
LOG_INFO
public static final org.slf4j.Logger LOG_INFO
-
LOG_TRACE
public static final org.slf4j.Logger LOG_TRACE
-
TRUE
public static final java.util.function.Predicate<java.lang.Object> TRUE
-
FALSE
public static final java.util.function.Predicate<java.lang.Object> FALSE
-
NOT_NULL
public static final java.util.function.Predicate<java.lang.Object> NOT_NULL
-
myConstraints
private final IterationConditions<N> myConstraints
-
myRecursion
private final java.util.function.Predicate<? super N> myRecursion
-
myFilter
protected final java.util.function.Predicate<? super N> myFilter
-
-
Constructor Detail
-
TreeIterator
public TreeIterator(IterationConditions<N> constraints, java.util.function.Predicate<? super N> filter)
-
TreeIterator
public TreeIterator(IterationConditions<N> constraints)
-
TreeIterator
public TreeIterator(IterationConditions<N> constraints, java.util.function.Predicate<? super N> filter, java.util.function.Predicate<? super N> recursion)
-
-
Method Detail
-
getPredicate
@NotNull public @NotNull java.util.function.Predicate<N> getPredicate(@NotNull @NotNull java.lang.Class<? super N> clazz)
-
getPredicate
@NotNull public <F> @NotNull java.util.function.Predicate<N> getPredicate(@NotNull @NotNull java.lang.Class<F> clazz, @NotNull @NotNull java.util.function.Predicate<? super F> predicate)
-
getConstraints
@NotNull public @NotNull IterationConditions<N> getConstraints()
-
getRecursion
public java.util.function.Predicate<? super N> getRecursion()
-
getFilter
public java.util.function.Predicate<? super N> getFilter()
-
modifiedCopy
@NotNull public @NotNull TreeIterator<N> modifiedCopy(@NotNull @NotNull IterationConditions<N> constraints, @NotNull @NotNull java.util.function.Predicate<? super N> filter, @NotNull @NotNull java.util.function.Predicate<? super N> recursion)
-
reversed
@NotNull public @NotNull TreeIterator<N> reversed()
-
recursive
@NotNull public @NotNull TreeIterator<N> recursive()
-
nonRecursive
@NotNull public @NotNull TreeIterator<N> nonRecursive()
-
recurse
@NotNull public @NotNull TreeIterator<N> recurse(@NotNull @NotNull java.util.function.Predicate<? super N> predicate)
-
recurse
@NotNull public @NotNull TreeIterator<N> recurse(@NotNull @NotNull java.lang.Class<? super N> clazz)
-
recurse
@NotNull public <F> @NotNull TreeIterator<N> recurse(@NotNull @NotNull java.lang.Class<F> clazz, @NotNull @NotNull java.util.function.Predicate<? super F> predicate)
-
noRecurse
@NotNull public @NotNull TreeIterator<N> noRecurse(@NotNull @NotNull java.util.function.Predicate<? super N> predicate)
-
noRecurse
@NotNull public @NotNull TreeIterator<N> noRecurse(@NotNull @NotNull java.lang.Class<? super N> clazz)
-
noRecurse
@NotNull public <F> @NotNull TreeIterator<N> noRecurse(@NotNull @NotNull java.lang.Class<F> clazz, @NotNull @NotNull java.util.function.Predicate<? super F> predicate)
-
aborted
@NotNull public @NotNull TreeIterator<N> aborted()
-
filterOut
@NotNull public @NotNull TreeIterator<N> filterOut(@NotNull @NotNull java.util.function.Predicate<? super N> predicate)
-
filterOut
@NotNull public @NotNull TreeIterator<N> filterOut(@NotNull @NotNull java.lang.Class<? super N> clazz)
-
filterOut
@NotNull public <F> @NotNull TreeIterator<N> filterOut(@NotNull @NotNull java.lang.Class<F> clazz, @NotNull @NotNull java.util.function.Predicate<? super F> predicate)
-
filter
@NotNull public @NotNull TreeIterator<N> filter(@NotNull @NotNull java.util.function.Predicate<? super N> predicate)
-
filter
@NotNull public @NotNull TreeIterator<N> filter(@NotNull @NotNull java.lang.Class<? super N> clazz)
-
filter
@NotNull public <F> @NotNull TreeIterator<N> filter(@NotNull @NotNull java.lang.Class<F> clazz, @NotNull @NotNull java.util.function.Predicate<? super F> predicate)
-
of
@NotNull public static <N> @NotNull TreeIterator<N> of(@NotNull @NotNull IterationConditions<N> constraints)
-
of
@NotNull public static <N> @NotNull TreeIterator<N> of(@NotNull @NotNull IterationConditions<N> constraints, @NotNull @NotNull java.util.function.Predicate<? super N> filter)
-
of
@NotNull public static <N> @NotNull TreeIterator<N> of(@NotNull @NotNull IterationConditions<N> constraints, @NotNull @NotNull java.util.function.Predicate<? super N> filter, @NotNull @NotNull java.util.function.Predicate<? super N> recursion)
-
TRUE
@NotNull public static <N> @NotNull java.util.function.Predicate<N> TRUE()
-
FALSE
@NotNull public static <N> @NotNull java.util.function.Predicate<N> FALSE()
-
iterate
public <R> ValueIteration<R> iterate(@NotNull N element, @NotNull R defaultValue, @NotNull @NotNull ValueIterationConsumer<? super N,R> consumer)
-
iterate
public <T,R> ValueIteration<R> iterate(@NotNull N element, @NotNull R defaultValue, @NotNull @NotNull ValueIterationAdapter<? super N,T> adapter, @NotNull @NotNull ValueIterationConsumer<? super T,R> consumer)
-
iterate
public <R> VoidIteration iterate(@NotNull N element, @NotNull @NotNull VoidIterationConsumer<? super N> consumer)
-
iterate
public <T,R> VoidIteration iterate(@NotNull N element, @NotNull @NotNull ValueIterationAdapter<? super N,T> adapter, @NotNull @NotNull VoidIterationConsumer<? super T> consumer)
-
doLoop
@NotNull public <R> R doLoop(@NotNull N element, @NotNull R defaultValue, @NotNull @NotNull ValueIterationConsumer<? super N,R> consumer)
-
doLoop
public void doLoop(@NotNull N element, @NotNull @NotNull VoidIterationConsumer<? super N> consumer)
-
doLoop
@NotNull public <T,R> R doLoop(@NotNull N element, @NotNull R defaultValue, @NotNull @NotNull ValueIterationAdapter<? super N,T> adapter, @NotNull @NotNull ValueIterationConsumer<? super T,R> consumer)
-
doLoop
public <T,R> void doLoop(@NotNull N element, @NotNull @NotNull ValueIterationAdapter<? super N,T> adapter, @NotNull @NotNull VoidIterationConsumer<? super T> consumer)
-
-