Extension SDK 10.1.2

oracle.ide.util
Class ArrayIterator

java.lang.Object
  extended byoracle.ide.util.ArrayIterator
All Implemented Interfaces:
java.util.Iterator

public class ArrayIterator
extends java.lang.Object
implements java.util.Iterator

The ArrayIterator class iterates over an array of Objects.


Constructor Summary
ArrayIterator(java.lang.Object[] array)
          Constructs an ArrayIterator from an array of Objects.
ArrayIterator(java.lang.Object[] array, int startIndex)
          Constructs an ArrayIterator from an array of Objects and an inclusive beginning index.
ArrayIterator(java.lang.Object[] array, int startIndex, int endIndex)
          Constructs an ArrayIterator from an array of Objects, an inclusive start index, and an exclusive end index.
 
Method Summary
 boolean hasNext()
          Returns true if there are more elements in the array; otherwise false.
 java.lang.Object next()
          Returns the next Object from the array.
 void remove()
          Currently unsupported; always throws an UnsupportedOperationException.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayIterator

public ArrayIterator(java.lang.Object[] array)
Constructs an ArrayIterator from an array of Objects.

Parameters:
array - the array of Objects over which to iterate

ArrayIterator

public ArrayIterator(java.lang.Object[] array,
                     int startIndex)
Constructs an ArrayIterator from an array of Objects and an inclusive beginning index. The iterator will return all elements from the beginning index to the end of the array.

Parameters:
array - the array of Objects in which to iterate
startIndex - the index of the first element to return.

ArrayIterator

public ArrayIterator(java.lang.Object[] array,
                     int startIndex,
                     int endIndex)
Constructs an ArrayIterator from an array of Objects, an inclusive start index, and an exclusive end index. The iterator will return all elements from the start index up to (but not including) the end index.

Parameters:
array - the array of Objects over which to iterate
startIndex - the index of the first element to return.
endIndex - the index of the element following the last element to return.
Method Detail

hasNext

public boolean hasNext()
Returns true if there are more elements in the array; otherwise false.

Specified by:
hasNext in interface java.util.Iterator

next

public java.lang.Object next()
Returns the next Object from the array.

Specified by:
next in interface java.util.Iterator

remove

public void remove()
Currently unsupported; always throws an UnsupportedOperationException.

Specified by:
remove in interface java.util.Iterator

Extension SDK

 

Copyright © 1997, 2004, Oracle. All rights reserved.