E
- The type of leaf member elements.T
- The type of the List
.public class FlatListIterator<E,T> extends FlatSequentialIterator<E,List<T>>
hasNext, stack
Constructor and Description |
---|
FlatListIterator(List<T> l)
Creates a new
FlatListIterator for List to be iterated. |
Modifier and Type | Method and Description |
---|---|
protected Object |
get(List<T> c,
int i)
Returns the element at index
i of the sequentially accessible
collection obj . |
protected boolean |
isIterable(Object obj)
Specifies whether the provided object is an iterable collection.
|
protected int |
size(List<T> c)
Returns the size of the sequentially accessible collection.
|
hasNext, next
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining, remove
public FlatListIterator(List<T> l)
FlatListIterator
for List
to be iterated.l
- The List
to be iterated.NullPointerException
- If the specified List
is null.protected int size(List<T> c)
FlatSequentialIterator
size
in class FlatSequentialIterator<E,List<T>>
c
- The sequentially accessible collection.protected Object get(List<T> c, int i)
FlatSequentialIterator
i
of the sequentially accessible
collection obj
.get
in class FlatSequentialIterator<E,List<T>>
c
- The sequentially accessible collection.i
- The index of the element.i
of the sequentially accessible
collection obj
.protected boolean isIterable(Object obj)
FlatIterator
isIterable
in class FlatIterator<E,List<T>>
obj
- The object to test.Copyright © 2020 LibJ. All rights reserved.