T - the type of elements that will be iterated overpublic 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.
| Constructor and Description |
|---|
ArrayIterator(T[] theArray)
Create a new ArrayIterator
|
ArrayIterator(T[] theArray,
int theStart,
int theEnd)
Create a new ArrayIterator
|
| Modifier and Type | Method and Description |
|---|---|
static <T> ArrayIterator<T> |
create(T... theElements) |
boolean |
hasNext() |
T |
next() |
T |
peek() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic ArrayIterator(T[] theArray)
theArray - the array to iterate overpublic ArrayIterator(T[] theArray, int theStart, int theEnd)
theArray - the array to iterate overtheStart - the starting position of the arraytheEnd - the end position of the array@SafeVarargs public static <T> ArrayIterator<T> create(T... theElements)
public T next()
Copyright © 2010-2016 Stardog Union. All Rights Reserved.