E - the type of data to iteratepublic class ListDataIterator<E> extends Object implements DataIterator<E>
List-based implementation of the DataIterator interface.
Created: 08.12.2011 14:36:08| Constructor and Description |
|---|
ListDataIterator(Class<E> type,
E... data) |
ListDataIterator(Class<E> type,
List<E> data) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the iterator.
|
Class<E> |
getType()
Returns the type of the iterated elements.
|
DataContainer<E> |
next(DataContainer<E> container)
Returns the container with the next data element if available, otherwise null.
|
public Class<E> getType()
DataIteratorgetType in interface DataIterator<E>public DataContainer<E> next(DataContainer<E> container)
DataIteratornext in interface DataIterator<E>container - a DataContainer to receive the iterated dataDataContainer that holds the next element, or null if none is availablepublic void close()
DataIteratorclose in interface Closeableclose in interface AutoCloseableclose in interface DataIterator<E>Copyright © 2006–2016 Volker Bergmann. All rights reserved.