class AbstractForwardSequentialList extends AbstractSequentialList<T> {

    @Override @Nonnull public ListIterator<T> listIterator(final int initialIndex) {

        final Iterator<T> initialIterator;
        try {
            initialIterator = iterator(initialIndex);
        } catch (NoSuchElementException ex) {
            throw new IndexOutOfBoundsException();
        }

        return new AbstractListIterator<T>() {
            private int index = initialIndex - 1;
            @Nullable private Iterator<T> forwardIterator = initialIterator;

            @Nonnull
            private Iterator<T> getForwardIterator() {
                if (forwardIterator == null) {
                    try {
                        forwardIterator = iterator(index+1);
                    } catch (IndexOutOfBoundsException ex) {
                        throw new NoSuchElementException();
                    }
                }
                return forwardIterator;
            }

            @Override public boolean hasNext() {
                return getForwardIterator().hasNext();
            }

            @Override public boolean hasPrevious() {
                return index >= 0;
            }

            @Override public T next() {
                T ret = getForwardIterator().next();
                index++;
                return ret;
            }

            @Override public int nextIndex() {
                return index+1;
            }

            @Override public T previous() {
                forwardIterator = null;
                try {
                    return iterator(index--).next();
                } catch (IndexOutOfBoundsException ex) {
                    throw new NoSuchElementException();
                }
            }

            @Override public int previousIndex() {
                return index;
            }
        };
    }

}