Iterator (Java Card API, Connected Edition)
Date: 2009-12-11

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## java.util
Interface Iterator<E>

    public interface Iterator<E>

An iterator over a collection. Iterator are especially used to iterate over a collection object when it's the target of the "foreach" statement. This Java Card interface is a subset of the CDC 1.1 Iterator interface. Some interfaces, methods and/or variables have been pruned, and/or other methods simplified, in an effort to reduce the size of this class and/or eliminate dependencies on unsupported features.

Since:
  JDK1.2, CDC 1.1, Java Card 3.0
See Also:
  `Enumeration`, `Iterable`

Method Summary
`boolean` | `hasNext()` Returns `true` if the iteration has more elements.
`E` | `next()` Returns the next element in the iteration.

Method Detail

### hasNext

    boolean hasNext()

  Returns `true` if the iteration has more elements. (In other words, returns `true` if `next` would return an element rather than throwing an exception.)

  Returns:
    `true` if the iterator has more elements.

### next

    E next()

  Returns the next element in the iteration. Calling this method repeatedly until the `hasNext()` method returns false will return each element in the underlying collection exactly once.

  Returns:
    the next element in the iteration.
  Throws:
    `NoSuchElementException` - iteration has no more elements.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.