When we have a Collection, an Iterator is like to set up a pointer on the top of it. Instead of copying the original Collection elements, it just virtually puts a pointer on the top of the first element.
Then by calling next(), the pointer moves forward. Forward means it can only move one direction toward the end of the Collection.
However, if it's a List instead of a Set, one can call listiterator() which will give u a bi=directional Iterator. Then previous() method is added in addition to next().
To ensure not to hit outside of the Collection, hasNext() and hasPreviouse() are provided to Iterator interface.

解决方案 »

  1.   

    Add on of previous description:
    While using an Iterator or its subclass ListIterator, the original Collection is not supposed to be modified; otherwise, a ConcurrentModificationException will be thrown.
    Conceptually, if the origianl Collection has been changed, it will mess up the order of the Iterator.
      

  2.   

    Thread-safe and fail-fast are different topics.
    Sorry that I don't know how to put them in plain English.
      

  3.   

    thread-safe 线程安全 If methods are not synchronized, it's 
    not thread-safe.bi-directionally双向的 List classes use a ListIterator.A ListIterator lets you traverse bi-directionally.Iterator  迭代器  
    所有容器都以相同的方式处理元素的置入和取出。通常它們都会提供元素
    插入函数,以及元素取回函数。不过元素的取出动作较为复杂,因為「只
    能进行单一选取动作」的函数实在是束缚过多,碍手碍脚。如果你想同時
    操作或比较「一组」(而非一个)元素时,怎么办呢?迭代器(iterator)
    为此提供了解決之道。做为一个物件,迭代器的作用就是用来选择容器中
    的元素,并将这些元素呈现给迭代器使用者。身为一個class,迭代器提供
    了某种抽象,可将「容器内部细节」和「对容器进行存取动作之程序
    」分离开来。经由迭代器,容器被抽象化为仅仅是一组序列
    (sequence)。迭代器让你得以走访整个序列,无需烦恼底层结构
    究竟是ArrayList 或LinkedList 或Stack 或其他。这种弹性使我们可
    以轻易更改底层结构而不至于干扰应用程序。