Java ListIterator
ListIterator extends Iterator,比起Iterator主要只有forEach方法,而ListIterator增加了大量的List处理的方法
源码
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
   | public ListIterator<E>  extends Iterator<E>{   boolean hasNext();
    E next();
    boolean hasPrevious();
    E previous();
    int nextIndex();
    int previousIndex();
    void remove();
    void set(E e);
    void add(E e); }
  | 
 
显而易见,