edu.neu.ccs.quick
Class IteratorFactory

java.lang.Object
  |
  +--edu.neu.ccs.quick.IteratorFactory

public final class IteratorFactory
extends Object

IteratorFactory encapsulates a static method to construct a Java Iterator from an Object[] array.

This class cannot be instantiated.

Since:
2.3

Method Summary
static Iterator makeIterator(Object[] array)
          Returns an Iterator that iterates over the data in the given array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

makeIterator

public static Iterator makeIterator(Object[] array)

Returns an Iterator that iterates over the data in the given array. To make the iterator independent of the original array, a shallow copy of the array data is made.

Throws UnsupportedOperationException if the method remove() is called.

Returns:
the iterator that iterates over the array data