S - the type of data to iterate from the sourceT - the type of data to provide to the clientpublic class ConvertingDataIterator<S,T> extends DataIteratorAdapter<S,T>
DataIterator proxy which applies a Converter to the data provided by its source.
Created: 24.07.2011 09:52:35| Modifier and Type | Field and Description |
|---|---|
protected org.databene.commons.Converter<S,T> |
converter |
source| Constructor and Description |
|---|
ConvertingDataIterator(DataIterator<S> source,
org.databene.commons.Converter<S,T> converter) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the iterator.
|
Class<T> |
getType()
Returns the type of the iterated elements.
|
DataContainer<T> |
next(DataContainer<T> container)
Returns the container with the next data element if available, otherwise null.
|
String |
toString() |
getSourceContainer, nextOfSourcepublic ConvertingDataIterator(DataIterator<S> source, org.databene.commons.Converter<S,T> converter)
public Class<T> getType()
DataIteratorpublic DataContainer<T> next(DataContainer<T> container)
DataIteratorcontainer - 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<T>close in class DataIteratorAdapter<S,T>Copyright © 2006–2016 Volker Bergmann. All rights reserved.