Iterator的一个方法,实在看不懂是什么意思,谁能给翻译一下(我英语还行,只是无法理解这个)remove
void remove()
Removes from the underlying collection the last element returned by the iterator (optional operation). This method can be called only once per call to next. The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method. Throws: 
UnsupportedOperationException - if the remove operation is not supported by this Iterator. 
IllegalStateException - if the next method has not yet been called, or the remove method has already been called after the last call to the next method

解决方案 »

  1.   

    从迭代器指向的集合中移除迭代器返回的最后一个元素(可选操作)。每次调用 next 只能调用一次此方法。如果进行迭代时用调用此方法之外的其他方式修改了该迭代器所指向的集合,则迭代器的行为是不明确的。 抛出: 
    UnsupportedOperationException - 如果迭代器不支持 remove 操作。 
    IllegalStateException - 如果尚未调用 next 方法,或者在上一次调用 next 方法之后已经调用了 remove 方法。