加载中...
The Wayback Machine - https://sup1a9wrlpyh5li9ro.vcoronado.top/web/20090218032457/http://developer.android.com:80/reference/java/util/Iterator.html
public interface

Iterator

java.util.Iterator<E>
Known Indirect Subclasses

Class Overview

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

Summary

Public Methods
abstract boolean hasNext()
Returns if there are more elements to iterate.
abstract E next()
Returns the next object in the iteration.
abstract void remove()
Removes the last object returned by next from the collection.

Public Methods

public abstract boolean hasNext ()

Returns if there are more elements to iterate.

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

public abstract E next ()

Returns the next object in the iteration.

Returns
  • the next object
Throws
NoSuchElementException when there are no more elements
See Also

public abstract void remove ()

Removes the last object returned by next from the collection.

Throws
UnsupportedOperationException when removing is not supported by the collection being iterated
IllegalStateException when next has not been called, or remove has already been called after the last call to next