Interface Mapper

All Known Implementing Classes:
ColumnMapper, CompoundMapper, ConstantMapper, CropStringMapper, JepMapper, NullIfExceptionMapper

public interface Mapper
Represents a mapping expression that gets a single value from a line of data. A typical mapping expression holds a reference to the column number or name, for example:
\1\
\row\
Row: \row\, Col:\col\
=2 * col('Radius')
The actual syntax for the mapping string depends on the parser used.
Version:
2.0
Author:
Nicklas
See Also:
Last modified
$Date: 2019-04-11 09:31:26 +0200 (tors, 11 apr. 2019) $
  • Method Details

    • getValue

      Deprecated.
      In 3.15, use getString(FlatFileParser.Data) instead or one of the other getXxxx() methods to get a given data type directly
      Get the value for the line of data.
      Parameters:
      data - The line of data
      Returns:
      A string value
    • getString

      String getString(FlatFileParser.Data data)
      Get the value for the line of data as a string.
      Parameters:
      data - The line of data
      Returns:
      A string value
      Since:
      3.15
    • getInt

      Get the value for the line of data as an integer.
      Parameters:
      data - The line of data
      Returns:
      The value as an integer
      Throws:
      NumberFormatException - If the value can't be parsed as an integer
    • getLong

      Long getLong(FlatFileParser.Data data)
      Get the value for the line of data as a long.
      Parameters:
      data - The line of data
      Returns:
      The value as an long
      Throws:
      NumberFormatException - If the value can't be parsed as an long
      Since:
      3.15
    • getFloat

      Float getFloat(FlatFileParser.Data data)
      Get the value for the line of data as a float.
      Parameters:
      data - The line of data
      Returns:
      The value as a float
      Throws:
      NumberFormatException - If the value can't be parsed as a float
    • getDouble

      Double getDouble(FlatFileParser.Data data)
      Get the value for the line of data as a double.
      Parameters:
      data - The line of data
      Returns:
      The value as a double
      Throws:
      NumberFormatException - If the value can't be parsed as a double
      Since:
      3.15
    • getDate

      Date getDate(FlatFileParser.Data data)
      Get the value for the line of data as a date.
      Parameters:
      data - The line of data
      Returns:
      The value as a date
      Since:
      3.15
    • getByType

      default <T> T getByType(FlatFileParser.Data data, Type type)