Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public interface

Enumeration

java.util.Enumeration<E>
Known Indirect Subclasses

Class Overview

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 )">list(Enumeration ) to get a List .

If you need an Enumeration for a legacy API and have a Collection , you can use )">enumeration(Collection ) .

See Also

Summary

Public Methods
abstract boolean hasMoreElements ()
Returns whether this Enumeration has more elements.
abstract E nextElement ()
Returns the next element in this Enumeration .

Public Methods

public abstract boolean hasMoreElements ()

Added in API level 1

Returns whether this Enumeration has more elements.

Returns
  • true if there are more elements, false otherwise.

public abstract E nextElement ()

Added in API level 1

Returns the next element in this Enumeration .

Returns
  • the next element..
Throws
NoSuchElementException if there are no more elements.