@Test public void listIterator() throws Exception { ReItrLinkedList<String> l = new ReItrLinkedList<>(); String[] strs = {"abc", "123", "hehe"}; Collections.addAll(l, strs); ReusableListIterator<String> itr = l.listIterator(); assertEquals(strs[0], itr.next()); assertEquals(strs[1], itr.next()); assertEquals(strs[1], itr.previous()); ReusableIterator<String> retItr = itr.rewind(); assertTrue(retItr == itr); assertFalse(itr.hasPrevious()); assertEquals(strs[0], itr.next()); retItr = itr.rewind(1); assertTrue(retItr == itr); assertTrue(itr.hasPrevious()); assertEquals(0, itr.previousIndex()); assertEquals(1, itr.nextIndex()); assertEquals(strs[1], itr.next()); }
public ReusableListIterator<E> listIterator() { return listIterator(0); }
ReItrLinkedList extends AbstractSequentialList<E> implements List<E>, Deque<E>, Cloneable, java.io.Serializable { public ReusableListIterator<E> listIterator() { return listIterator(0); } }
ReItrLinkedList extends AbstractSequentialList<E> implements List<E>, Deque<E>, Cloneable, java.io.Serializable { public ReusableListIterator<E> listIterator() { return listIterator(0); } ReItrLinkedList();  ReItrLinkedList(Collection<? extends E> c); }
ReItrLinkedList extends AbstractSequentialList<E> implements List<E>, Deque<E>, Cloneable, java.io.Serializable { public ReusableListIterator<E> listIterator() { return listIterator(0); } ReItrLinkedList();  ReItrLinkedList(Collection<? extends E> c); E getFirst(); E getLast(); E removeFirst(); E removeLast(); void addFirst(E e); void addLast(E e); boolean contains(Object o); int size(); boolean add(E e); boolean remove(Object o); boolean addAll(Collection<? extends E> c); boolean addAll(int index, Collection<? extends E> c); void clear(); E get(int index); E set(int index, E element); void add(int index, E element); E remove(int index); int indexOf(Object o); int lastIndexOf(Object o); E peek(); E element(); E poll(); E remove(); boolean offer(E e); boolean offerFirst(E e); boolean offerLast(E e); E peekFirst(); E peekLast(); E pollFirst(); E pollLast(); void push(E e); E pop(); boolean removeFirstOccurrence(Object o); boolean removeLastOccurrence(Object o); ReusableIterator<E> iterator(); ReusableListIterator<E> listIterator(); ReusableListIterator<E> listIterator(int index); Iterator<E> descendingIterator(); Object clone(); Object[] toArray(); @SuppressWarnings("unchecked") T[] toArray(T[] a); }
ReItrLinkedList extends AbstractSequentialList<E> implements List<E>, Deque<E>, Cloneable, java.io.Serializable { public ReusableListIterator<E> listIterator() { return listIterator(0); } ReItrLinkedList();  ReItrLinkedList(Collection<? extends E> c); E getFirst(); E getLast(); E removeFirst(); E removeLast(); void addFirst(E e); void addLast(E e); boolean contains(Object o); int size(); boolean add(E e); boolean remove(Object o); boolean addAll(Collection<? extends E> c); boolean addAll(int index, Collection<? extends E> c); void clear(); E get(int index); E set(int index, E element); void add(int index, E element); E remove(int index); int indexOf(Object o); int lastIndexOf(Object o); E peek(); E element(); E poll(); E remove(); boolean offer(E e); boolean offerFirst(E e); boolean offerLast(E e); E peekFirst(); E peekLast(); E pollFirst(); E pollLast(); void push(E e); E pop(); boolean removeFirstOccurrence(Object o); boolean removeLastOccurrence(Object o); ReusableIterator<E> iterator(); ReusableListIterator<E> listIterator(); ReusableListIterator<E> listIterator(int index); Iterator<E> descendingIterator(); Object clone(); Object[] toArray(); @SuppressWarnings("unchecked") T[] toArray(T[] a);  }