public class ArrayIterator extends Object implements RangeIterator
RangeIterator
interface. This class
implements the RangeIterator functionality for an underlying array
of objects. Used as the base class for the type-specific iterator
classes defined in this package.Constructor and Description |
---|
ArrayIterator(Object[] array)
Creates an iterator for the given array of objects.
|
Modifier and Type | Method and Description |
---|---|
long |
getPosition() |
long |
getSize() |
boolean |
hasNext() |
Object |
next() |
void |
remove() |
void |
skip(long items) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
public ArrayIterator(Object[] array)
array
- the objects to iteratepublic void skip(long items)
skip
in interface RangeIterator
public long getSize()
getSize
in interface RangeIterator
public long getPosition()
getPosition
in interface RangeIterator
Copyright © 2004–2021 The Apache Software Foundation. All rights reserved.