E
- The type of leaf member elements.T
- The type of the collection.public abstract class FlatSequentialIterator<E,T> extends FlatIterator<E,T>
Iterator
for N-dimensional sequentially accessible collections of
type <T>
(arrays or lists) that iterates through the leaf members of
the collections of type <E>
.hasNext, stack
Constructor and Description |
---|
FlatSequentialIterator(T c)
Creates a new
FlatSequentialIterator for collection to be iterated. |
Modifier and Type | Method and Description |
---|---|
protected abstract Object |
get(T c,
int i)
Returns the element at index
i of the sequentially accessible
collection obj . |
boolean |
hasNext() |
E |
next() |
protected abstract int |
size(T c)
Returns the size of the sequentially accessible collection.
|
isIterable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining, remove
public FlatSequentialIterator(T c)
FlatSequentialIterator
for collection to be iterated.c
- The collection to be iterated.NullPointerException
- If the specified collection is null.protected abstract int size(T c)
c
- The sequentially accessible collection.protected abstract Object get(T c, int i)
i
of the sequentially accessible
collection obj
.c
- The sequentially accessible collection.i
- The index of the element.i
of the sequentially accessible
collection obj
.public boolean hasNext()
public E next()
Copyright © 2020 LibJ. All rights reserved.