ChainIterator

public class ChainIterator<E> implements ListIterator<E>

Iterator that extends the ListIterator interface with some handy methods. TODO: Mutators should check the order is kept by using Comparable

See also

Constructors

Link copied to clipboard
public void ChainIterator(List<E> list, int index)
public void ChainIterator(List<E> list)

Functions

Link copied to clipboard
public void add(E e)
Link copied to clipboard
public void forEachRemaining(Consumer<? super E> action)
Link copied to clipboard
public boolean hasNext()
Link copied to clipboard
public boolean hasPrevious()
Link copied to clipboard
public E next()
Link copied to clipboard
public int nextIndex()
Link copied to clipboard
public boolean noEffects()
Link copied to clipboard
public E peekNext()
Link copied to clipboard
public E peekPrevious()
Link copied to clipboard
public E previous()
Link copied to clipboard
public int previousIndex()
Link copied to clipboard
public void remove()
Link copied to clipboard
public void set(E e)
Link copied to clipboard
public E tryPeekNext(E other)
Fail-safe method for fetching data from next element (if exists).
Link copied to clipboard
public E tryPeekPrevious(E other)
Fail-safe method for fetching data from previous element (if exists).