站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 common API Documentation 英文版文档

ArrayIterator (JBoss/Common API) - JBoss 4.0.1 sp1 common API Documentation 英文版文档


org.jboss.util.collection
Class ArrayIterator

java.lang.Object
  extended byorg.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.


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