| Modifier and Type | Field and Description |
|---|---|
| public static final ReversiblePeekingIterator | |
| pack-priv final Node | |
| pack-priv final Node | |
| pack-priv Node | |
| pack-priv Node | |
| pack-priv final boolean |
| Access | Constructor and Description |
|---|---|
| public | NodeIterator(Node
node from which to start the iteration and continue until all sibling nodes have been traversed firstNode)
|
| public | NodeIterator(Node
node from which to start the iteration and continue until all sibling nodes have been traversed firstNode, boolean true/false if the nodes are to be traversed in reverse order. If true the nodes previous sibling will be used instead of next sibling reversed)
|
| public | NodeIterator(Node
node from which to start the iteration and continue until all sibling nodes have been traversed or lastNode has been traversed firstNode, Node the last node to be traversed lastNode)
|
| public | NodeIterator(Node
node from which to start the iteration and continue until all sibling nodes have been traversed or lastNode has been traversed firstNode, Node the last node to be traversed lastNode, boolean true/false if the nodes are to be traversed in reverse order. If true the nodes previous sibling will be used instead of next sibling reversed)iterate nodes until null or last node is iterated over |
| Modifier and Type | Method and Description |
|---|---|
| public void | forEachRemaining(Consumer<? super Node>
The action to be performed for each element consumer)Overrides default java. Performs the given action for each remaining element until all elements have been processed or the action throws an exception. |
| public boolean | Returns: true if there is a next nodeImplements java. Returns |
| public boolean | Returns: true if the iterator is a reversed iteratorImplements com.
|
| public Node | Returns: the next node for the iterator. If the iterator is not reversed then the previous node's next sibling is returned. If it is reversed the the previous node's previous sibling is returned.Implements java. Returns the next element in the iteration. |
| public @Nullable Node | Returns: the node which would be returned by a call tonext() or null if there is no next node.Implements com.
|
| public void |
| EMPTY | back to summary |
|---|---|
| public static final ReversiblePeekingIterator<Node> EMPTY | |
| firstNode | back to summary |
|---|---|
| pack-priv final Node firstNode | |
| lastNode | back to summary |
|---|---|
| pack-priv final Node lastNode | |
| node | back to summary |
|---|---|
| pack-priv Node node | |
| result | back to summary |
|---|---|
| pack-priv Node result | |
| reversed | back to summary |
|---|---|
| pack-priv final boolean reversed | |
| NodeIterator | back to summary |
|---|---|
public NodeIterator(Node firstNode)
| |
| NodeIterator | back to summary |
|---|---|
public NodeIterator(Node firstNode, boolean reversed)
| |
| NodeIterator | back to summary |
|---|---|
| public NodeIterator(Node firstNode, Node lastNode) | |
| NodeIterator | back to summary |
|---|---|
| public NodeIterator(Node firstNode, Node lastNode, boolean reversed) iterate nodes until null or last node is iterated over
| |
| forEachRemaining | back to summary |
|---|---|
| public void forEachRemaining(Consumer<? super Node> consumer) Overrides default java. Doc from java. Performs the given action for each remaining element 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 an iterator is unspecified if the action modifies the
collection in any way (even by calling the Subsequent behavior of an iterator is unspecified if the action throws an exception. | |
| hasNext | back to summary |
|---|---|
| public boolean hasNext() Implements java. Doc from java. Returns
| |
| isReversed | back to summary |
|---|---|
| public boolean isReversed() Implements com.
| |
| next | back to summary |
|---|---|
| public Node next() Implements java. Doc from java. Returns the next element in the iteration. | |
| peek | back to summary |
|---|---|
| public @Nullable Node peek() Implements com. | |
| remove | back to summary |
|---|---|
| public void remove() Overrides default java. Remove the last node returned by
| |