Class ArrayIterator<ELEMENTTYPE>
java.lang.Object
com.helger.commons.collection.iterate.ArrayIterator<ELEMENTTYPE>
- Type Parameters:
ELEMENTTYPE- Type of object to iterate.
- All Implemented Interfaces:
ICommonsIterable<ELEMENTTYPE>,IIterableIterator<ELEMENTTYPE>,Iterable<ELEMENTTYPE>,Iterator<ELEMENTTYPE>
public final class ArrayIterator<ELEMENTTYPE>
extends Object
implements IIterableIterator<ELEMENTTYPE>
This is a small helper class for iterating over arrays.
- Author:
- Philip Helger
-
Constructor Summary
ConstructorsConstructorDescriptionArrayIterator(ELEMENTTYPE... aArray) ArrayIterator(ELEMENTTYPE[] aArray, int nOfs, int nLength) Private constructor with offset and length -
Method Summary
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.helger.commons.collection.impl.ICommonsIterable
containsAny, containsNone, containsOnly, findAll, findAllInstanceOf, findAllMapped, findAllMapped, findAllMapped, findFirst, findFirst, findFirstIndex, findFirstMapped, findFirstMapped, findLastIndex, forEachBreakable, forEachByIndex, forEachThrowing, getCount, getCountMethods inherited from interface com.helger.commons.collection.iterate.IIterableIterator
iterator, withFilter, withMapperMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Constructor Details
-
ArrayIterator
-
ArrayIterator
public ArrayIterator(@Nonnull ELEMENTTYPE[] aArray, @Nonnegative int nOfs, @Nonnegative int nLength) Private constructor with offset and length- Parameters:
aArray- Source arraynOfs- Offset. Must be ≥ 0.nLength- Length. Must be ≥ 0.
-
-
Method Details
-
hasNext
public boolean hasNext()- Specified by:
hasNextin interfaceIterator<ELEMENTTYPE>
-
next
- Specified by:
nextin interfaceIterator<ELEMENTTYPE>
-
equals
-
hashCode
public int hashCode() -
toString
-