Top Fields Constructors Methods
com.vladsch.flexmark.util.ast

public Class NodeIterable

extends Object
implements ReversiblePeekingIterable<Node>
Class Inheritance
All Implemented Interfaces
com.vladsch.flexmark.util.collection.iteration.ReversiblePeekingIterable, com.vladsch.flexmark.util.collection.iteration.ReversibleIterable, java.lang.Iterable
Imports
com.vladsch.flexmark.util.collection.iteration.ReversibleIterator, .ReversiblePeekingIterable, .ReversiblePeekingIterator, org.jetbrains.annotations.NotNull, java.util.function.Consumer

Field Summary

Modifier and TypeField and Description
public static final ReversiblePeekingIterable<Node>
pack-priv final Node
pack-priv final Node
pack-priv final boolean

Constructor Summary

AccessConstructor and Description
public
NodeIterable(Node firstNode, Node lastNode, boolean reversed)

Method Summary

Modifier and TypeMethod and Description
public void
forEach(Consumer<? super Node>
The action to be performed for each element
consumer
)

Overrides default java.lang.Iterable.forEach.

Performs the given action for each element of the Iterable until all elements have been processed or the action throws an exception.

public boolean
public @NotNull ReversiblePeekingIterator<Node>
iterator()

Implements com.vladsch.flexmark.util.collection.iteration.ReversiblePeekingIterable.iterator.

Returns an iterator over elements of type T.

public @NotNull ReversiblePeekingIterable<Node>
public @NotNull ReversiblePeekingIterator<Node>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

EMPTYback to summary
public static final ReversiblePeekingIterable<Node> EMPTY
firstNodeback to summary
pack-priv final Node firstNode
lastNodeback to summary
pack-priv final Node lastNode
reversedback to summary
pack-priv final boolean reversed

Constructor Detail

NodeIterableback to summary
public NodeIterable(Node firstNode, Node lastNode, boolean reversed)

Method Detail

forEachback to summary
public void forEach(Consumer<? super Node> consumer)

Overrides default java.lang.Iterable.forEach.

Doc from java.lang.Iterable.forEach.

Performs the given action for each element of the Iterable until all elements have been processed or the action throws an exception. Actions are performed in the order of iteration, if that order is specified. Exceptions thrown by the action are relayed to the caller.

The behavior of this method is unspecified if the action performs side-effects that modify the underlying source of elements, unless an overriding class has specified a concurrent modification policy.

Parameters
consumer:Consumer<? super Node>

The action to be performed for each element

isReversedback to summary
public boolean isReversed()

Implements com.vladsch.flexmark.util.collection.iteration.ReversibleIterable.isReversed.

Annotations
@Override
iteratorback to summary
public @NotNull ReversiblePeekingIterator<Node> iterator()

Implements com.vladsch.flexmark.util.collection.iteration.ReversiblePeekingIterable.iterator.

Doc from java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

Returns:@NotNull ReversiblePeekingIterator<Node>

an Iterator.

Annotations
@NotNull
@Override
reversedback to summary
public @NotNull ReversiblePeekingIterable<Node> reversed()

Implements com.vladsch.flexmark.util.collection.iteration.ReversiblePeekingIterable.reversed.

Annotations
@NotNull
@Override
reversedIteratorback to summary
public @NotNull ReversiblePeekingIterator<Node> reversedIterator()

Implements com.vladsch.flexmark.util.collection.iteration.ReversiblePeekingIterable.reversedIterator.

Annotations
@NotNull
@Override