/** * Creates a list iterator for the sublist. * * @param subList the sublist to get an iterator for * @param fromIndex the index to start from, relative to the sublist * @return the list iterator for the sublist */ @Override protected ListIterator<E> createSubListListIterator(final LinkedSubList<E> subList, final int fromIndex) { final SubCursor<E> cursor = new SubCursor<>(subList, fromIndex); registerCursor(cursor); return cursor; }
@Override public boolean hasNext() { return nextIndex() < sub.size; }
@Override public boolean hasPrevious() { return previousIndex() >= 0; }