Package com.complexible.common.collect
Class ArrayIterator<T>
java.lang.Object
com.google.common.collect.UnmodifiableIterator<T>
com.complexible.common.collect.ArrayIterator<T>
- Type Parameters:
T- the type of elements that will be iterated over
- All Implemented Interfaces:
com.google.common.collect.PeekingIterator<T>,Iterator<T>
public final class ArrayIterator<T>
extends com.google.common.collect.UnmodifiableIterator<T>
implements com.google.common.collect.PeekingIterator<T>
Class which adapts an array of objects to the Iterator interface, particularly to allow sub-arrays to be iterated over.
- Since:
- 2.0
- Version:
- 5.0
- Author:
- Michael Grove
-
Constructor Summary
ConstructorsConstructorDescriptionArrayIterator(T[] theArray) Create a new ArrayIteratorArrayIterator(T[] theArray, int theStart, int theEnd) Create a new ArrayIterator -
Method Summary
Methods inherited from class com.google.common.collect.UnmodifiableIterator
removeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemainingMethods inherited from interface com.google.common.collect.PeekingIterator
remove
-
Constructor Details
-
ArrayIterator
Create a new ArrayIterator- Parameters:
theArray- the array to iterate over
-
ArrayIterator
Create a new ArrayIterator- Parameters:
theArray- the array to iterate overtheStart- the starting position of the arraytheEnd- the end position of the array
-
-
Method Details