Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


oracle.javatools.util
Class ArrayIterator<E>

java.lang.Object
  extended by oracle.javatools.util.ArrayIterator<E>

All Implemented Interfaces:
java.util.Iterator<E>

public class ArrayIterator<E>
extends java.lang.Object
implements java.util.Iterator<E>

The ArrayIterator class iterates over an array.


Constructor Summary
ArrayIterator(E[] array)
          Constructs an ArrayIterator from an array of Objects.
ArrayIterator(E[] array, int startIndex)
          Constructs an ArrayIterator from an array of Objects and an inclusive beginning index.
ArrayIterator(E[] 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.
 E next()
          Returns the next Object from the array.
 void remove()
          Unsupported: if support were to be added, it should be disabled by default.

 

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

 

Constructor Detail

ArrayIterator

public ArrayIterator(E[] array)
Constructs an ArrayIterator from an array of Objects.
Parameters:
array - the array of Objects over which to iterate

ArrayIterator

public ArrayIterator(E[] 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(E[] 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<E>

next

public E next()
Returns the next Object from the array.
Specified by:
next in interface java.util.Iterator<E>

remove

public void remove()
Unsupported: if support were to be added, it should be disabled by default. Otherwise, an API that returned this expecting that its local copy was protected would suddenly be vulnerable.
Specified by:
remove in interface java.util.Iterator<E>

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


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