42 |
* be obtained by the enumeration method in class Collections. |
* be obtained by the enumeration method in class Collections. |
43 |
* |
* |
44 |
* @author Warren Levy <warrenl@cygnus.com> |
* @author Warren Levy <warrenl@cygnus.com> |
45 |
* @date August 25, 1998. |
* @author Eric Blake <ebb9@email.byu.edu> |
46 |
|
* @see Iterator |
47 |
|
* @see Hashtable |
48 |
|
* @see Vector |
49 |
|
* @since 1.0 |
50 |
|
* @status updated to 1.4 |
51 |
*/ |
*/ |
52 |
public interface Enumeration |
public interface Enumeration |
53 |
{ |
{ |
55 |
* Tests whether there are elements remaining in the enumeration. |
* Tests whether there are elements remaining in the enumeration. |
56 |
* |
* |
57 |
* @return true if there is at least one more element in the enumeration, |
* @return true if there is at least one more element in the enumeration, |
58 |
* that is, if the next call to nextElement will not throw a |
* that is, if the next call to nextElement will not throw a |
59 |
* NoSuchElementException. |
* NoSuchElementException. |
60 |
*/ |
*/ |
61 |
boolean hasMoreElements(); |
boolean hasMoreElements(); |
62 |
|
|
64 |
* Obtain the next element in the enumeration. |
* Obtain the next element in the enumeration. |
65 |
* |
* |
66 |
* @return the next element in the enumeration |
* @return the next element in the enumeration |
67 |
* @exception NoSuchElementException if there are no more elements |
* @throws NoSuchElementException if there are no more elements |
68 |
*/ |
*/ |
69 |
Object nextElement() throws NoSuchElementException; |
Object nextElement(); |
70 |
} |
} |