| 
 | JavaTM Platform Standard Ed. 6 | |||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
public interface Iterator<E>
对 collection 进行迭代的迭代器。迭代器取代了 Java Collections Framework 中的 Enumeration。迭代器与枚举有两点不同:
此接口是 Java Collections Framework 的成员。
Collection, 
ListIterator, 
Enumeration| 方法摘要 | |
|---|---|
|  boolean | hasNext()如果仍有元素可以迭代,则返回 true。 | 
|  E | next()返回迭代的下一个元素。 | 
|  void | remove()从迭代器指向的 collection 中移除迭代器返回的最后一个元素(可选操作)。 | 
| 方法详细信息 | 
|---|
boolean hasNext()
E next()
NoSuchElementException - 没有元素可以迭代。void remove()
UnsupportedOperationException - 如果迭代器不支持 remove 操作。
IllegalStateException - 如果尚未调用 next 方法,或者在上一次调用 next 方法之后已经调用了 remove 方法。| 
 | JavaTM Platform Standard Ed. 6 | |||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。