Package com.vladsch.flexmark.util.ast
Class DescendantNodeIterator
- java.lang.Object
-
- com.vladsch.flexmark.util.ast.DescendantNodeIterator
-
- All Implemented Interfaces:
com.vladsch.flexmark.util.collection.iteration.ReversibleIterator<Node>,com.vladsch.flexmark.util.collection.iteration.ReversiblePeekingIterator<Node>,Iterator<Node>
public class DescendantNodeIterator extends Object implements com.vladsch.flexmark.util.collection.iteration.ReversiblePeekingIterator<Node>
-
-
Constructor Summary
Constructors Constructor Description DescendantNodeIterator(@NotNull com.vladsch.flexmark.util.collection.iteration.ReversiblePeekingIterator<Node> iterator)iterate nodes, with descendants, depth first until all are done
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidforEachRemaining(@NotNull Consumer<? super Node> consumer)booleanhasNext()booleanisReversed()@NotNull Nodenext()@Nullable Nodepeek()voidremove()
-
-
-
Constructor Detail
-
DescendantNodeIterator
public DescendantNodeIterator(@NotNull @NotNull com.vladsch.flexmark.util.collection.iteration.ReversiblePeekingIterator<Node> iterator)iterate nodes, with descendants, depth first until all are done- Parameters:
iterator- iterator to use for iterating nodes and their descendants
-
-
Method Detail
-
isReversed
public boolean isReversed()
- Specified by:
isReversedin interfacecom.vladsch.flexmark.util.collection.iteration.ReversibleIterator<Node>
-
peek
@Nullable public @Nullable Node peek()
- Specified by:
peekin interfacecom.vladsch.flexmark.util.collection.iteration.ReversiblePeekingIterator<Node>
-
forEachRemaining
public void forEachRemaining(@NotNull @NotNull Consumer<? super Node> consumer)- Specified by:
forEachRemainingin interfaceIterator<Node>
-
-