S - the type of data to iterate from the sourceT - the type of data to provide to the clientpublic class ConvertingDataSource<S,T> extends DataSourceAdapter<S,T>
DataSource proxy which applies a Converter to the source's data.
Created: 24.07.2011 10:06:31| Modifier and Type | Field and Description |
|---|---|
protected org.databene.commons.Converter<S,T> |
converter |
sourcetype| Constructor and Description |
|---|
ConvertingDataSource(DataSource<S> source,
org.databene.commons.Converter<S,T> converter) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the data source
|
Class<T> |
getType()
Returns the type of the iterated objects.
|
DataIterator<T> |
iterator()
Creates a
DataIterator for iterating the available data items. |
String |
toString() |
public ConvertingDataSource(DataSource<S> source, org.databene.commons.Converter<S,T> converter)
public Class<T> getType()
DataSourcegetType in interface DataSource<T>getType in class AbstractDataSource<T>public DataIterator<T> iterator()
DataSourceDataIterator for iterating the available data items.public void close()
DataSourceclose in interface Closeableclose in interface AutoCloseableclose in interface DataSource<T>close in class DataSourceAdapter<S,T>Copyright © 2006–2016 Volker Bergmann. All rights reserved.