Class IterableIterator<ELEMENTTYPE>
- java.lang.Object
-
- com.helger.commons.collection.iterate.IterableIterator<ELEMENTTYPE>
-
- Type Parameters:
ELEMENTTYPE- The type of elements to iterate.
- All Implemented Interfaces:
ICommonsIterable<ELEMENTTYPE>,IIterableIterator<ELEMENTTYPE>,Iterable<ELEMENTTYPE>,Iterator<ELEMENTTYPE>
- Direct Known Subclasses:
FileSystemIterator
public class IterableIterator<ELEMENTTYPE> extends Object implements IIterableIterator<ELEMENTTYPE>
This class is used for simpler iteration over an Iterator via the new "for" syntax.- Author:
- Philip Helger
-
-
Constructor Summary
Constructors Constructor Description IterableIterator(ELEMENTTYPE[] aCont)IterableIterator(Iterable<ELEMENTTYPE> aCont)IterableIterator(Iterator<ELEMENTTYPE> aIter)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <ELEMENTTYPE>
IIterableIterator<ELEMENTTYPE>createEmpty()booleanhasNext()Iterator<ELEMENTTYPE>iterator()ELEMENTTYPEnext()voidremove()StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods 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, getCount
-
Methods inherited from interface com.helger.commons.collection.iterate.IIterableIterator
withFilter, withMapper
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Constructor Detail
-
IterableIterator
public IterableIterator(@Nonnull ELEMENTTYPE[] aCont)
-
IterableIterator
public IterableIterator(@Nonnull Iterable<ELEMENTTYPE> aCont)
-
IterableIterator
public IterableIterator(@Nonnull Iterator<ELEMENTTYPE> aIter)
-
-
Method Detail
-
hasNext
public final boolean hasNext()
- Specified by:
hasNextin interfaceIterator<ELEMENTTYPE>
-
next
@Nullable public final ELEMENTTYPE next()
- Specified by:
nextin interfaceIterator<ELEMENTTYPE>
-
remove
public final void remove()
- Specified by:
removein interfaceIterator<ELEMENTTYPE>
-
iterator
@Nonnull public final Iterator<ELEMENTTYPE> iterator()
- Specified by:
iteratorin interfaceIIterableIterator<ELEMENTTYPE>- Specified by:
iteratorin interfaceIterable<ELEMENTTYPE>
-
createEmpty
@Nonnull public static <ELEMENTTYPE> IIterableIterator<ELEMENTTYPE> createEmpty()
-
-