public class RenamedDataEntryReader extends java.lang.Object implements DataEntryReader
DataEntryReader
delegates to another DataEntryReader
, renaming the data
entries based on the given string function. Entries whose name are transformed to null or an
empty string are passed to an optional alternative DataEntryReader
.Constructor and Description |
---|
RenamedDataEntryReader(StringFunction nameFunction,
DataEntryReader dataEntryReader)
Creates a new RenamedDataEntryReader.
|
RenamedDataEntryReader(StringFunction nameFunction,
DataEntryReader dataEntryReader,
DataEntryReader missingDataEntryReader)
Creates a new RenamedDataEntryReader.
|
Modifier and Type | Method and Description |
---|---|
void |
read(DataEntry dataEntry)
Reads the given data entry.
|
public RenamedDataEntryReader(StringFunction nameFunction, DataEntryReader dataEntryReader)
nameFunction
- the function from old names to new names.dataEntryReader
- the DataEntryReader to which renamed data entries will be passed.public RenamedDataEntryReader(StringFunction nameFunction, DataEntryReader dataEntryReader, DataEntryReader missingDataEntryReader)
nameFunction
- the function from old names to new names.dataEntryReader
- the DataEntryReader to which renamed data entries will be passed.missingDataEntryReader
- the optional DataEntryReader to which data entries that can't be
renamed will be passed.public void read(DataEntry dataEntry) throws java.io.IOException
DataEntryReader
read
in interface DataEntryReader
java.io.IOException