1 |
/* Iterator.java -- Interface for iterating over collections |
/* Iterator.java -- Interface for iterating over collections |
2 |
Copyright (C) 1998, 2001 Free Software Foundation, Inc. |
Copyright (C) 1998, 2001, 2004 Free Software Foundation, Inc. |
3 |
|
|
4 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
5 |
|
|
54 |
* @since 1.2 |
* @since 1.2 |
55 |
* @status updated to 1.4 |
* @status updated to 1.4 |
56 |
*/ |
*/ |
57 |
public interface Iterator |
public interface Iterator<E> |
58 |
{ |
{ |
59 |
/** |
/** |
60 |
* Tests whether there are elements remaining in the collection. In other |
* Tests whether there are elements remaining in the collection. In other |
70 |
* @return the next element in the collection |
* @return the next element in the collection |
71 |
* @throws NoSuchElementException if there are no more elements |
* @throws NoSuchElementException if there are no more elements |
72 |
*/ |
*/ |
73 |
Object next(); |
E next(); |
74 |
|
|
75 |
/** |
/** |
76 |
* Remove from the underlying collection the last element returned by next |
* Remove from the underlying collection the last element returned by next |