Since: API Level 1
public interface

Enumeration

java.util.Enumeration<E>
Known Indirect Subclasses

Class Overview

An Enumeration is used to sequence over a collection of objects.

Preferably an Iterator should be used. Iterator replaces the enumeration interface and adds a way to remove elements from a collection.

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 ()

Since: API Level 1

Returns whether this Enumeration has more elements.

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

public abstract E nextElement ()

Since: API Level 1

Returns the next element in this Enumeration.

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