DthingApi
Public Member Functions | List of all members
java.util.Enumeration< E > Interface Template Reference

Public Member Functions

boolean hasMoreElements ()
 
nextElement ()
 

Detailed Description

A legacy iteration interface.

New code should use Iterator instead.

Iterator

replaces the enumeration interface and adds a way to remove elements from a collection.

If you have an

Enumeration

and want a

Collection

, you can use Collections#list to get a

List

.

If you need an

Enumeration

for a legacy API and have a

Collection

, you can use Collections#enumeration.

Version
1.0
See also
Iterator

Member Function Documentation

◆ hasMoreElements()

boolean java.util.Enumeration< E >.hasMoreElements ( )

Returns whether this

Enumeration

has more elements.

Returns
true
if there are more elements,
false
otherwise.
See also
nextElement

◆ nextElement()

E java.util.Enumeration< E >.nextElement ( )

Returns the next element in this

Enumeration

.

Returns
the next element..
Exceptions
NoSuchElementExceptionif there are no more elements.
See also
hasMoreElements

The documentation for this interface was generated from the following file: