/** * 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 a new list iterator on the given sublist */ protected ListIterator<E> createSubListListIterator(final LinkedSubList<E> subList, final int fromIndex) { return new LinkedSubListIterator<>(subList, fromIndex); }
@Override public boolean hasNext() { return nextIndex() < sub.size; }
@Override public boolean hasPrevious() { return previousIndex() >= 0; }