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

## org.jboss.util.collection
Class ArrayIterator

    java.lang.Object
      org.jboss.util.collection.ArrayIterator

All Implemented Interfaces:
  Cloneable, Iterator, Serializable

public class ArrayIterator
extends Object
implements Iterator, Serializable, Cloneable

An array iterator.

Version:
  `$Revision: 1.3 $`
Author:
  Jason Dillon
See Also:
  Serialized Form

Field Summary
`protected Object[]` | `array` Array to iterate over.
`protected int` | `index` The current position in the array.

Constructor Summary
`ArrayIterator(Object[] array)` Construct an ArrayIterator.

Method Summary
`Object` | `clone()` Returns a shallow cloned copy of this object.
`boolean` | `hasNext()` Returns true if there are more elements in the iteration.
`Object` | `next()` Returns the next element in the iteration.
`void` | `remove()` Unsupported.

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### array

    protected final Object[] array

  Array to iterate over.

### index

    protected int index

  The current position in the array.

Constructor Detail

### ArrayIterator

    public ArrayIterator(Object[] array)

  Construct an ArrayIterator.

Parameters:
  `array` - The array to iterate over.

Method Detail

### hasNext

    public boolean hasNext()

  Returns true if there are more elements in the iteration.

  Specified by:
    `hasNext` in interface `Iterator`
  Returns:
    True if there are more elements in the iteration.

### next

    public Object next()

  Returns the next element in the iteration.

  Specified by:
    `next` in interface `Iterator`
  Returns:
    The next element in the iteration.
  Throws:
    `NoSuchElementException` - The are no more elements available.

### remove

    public void remove()

  Unsupported.

  Specified by:
    `remove` in interface `Iterator`
  Throws:
    `UnsupportedOperationException`

### clone

    public Object clone()

  Returns a shallow cloned copy of this object.

  Returns:
    A shallow cloned copy of this object.

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

Copyright © 2002 JBoss Group, LLC. All Rights Reserved.