Class PassThroughLineMapper

  • All Implemented Interfaces:
    LineMapper<java.lang.String>

    public class PassThroughLineMapper
    extends java.lang.Object
    implements LineMapper<java.lang.String>
    Pass through LineMapper useful for passing the original String back directly rather than a mapped object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java.lang.StringmapLine​(java.lang.String line, int lineNumber)
      Implementations must implement this method to map the provided line to the parameter type T.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PassThroughLineMapper

        public PassThroughLineMapper()
    • Method Detail

      • mapLine

        public java.lang.String mapLine​(java.lang.String line,
                                        int lineNumber)
                                 throws java.lang.Exception
        Description copied from interface: LineMapper
        Implementations must implement this method to map the provided line to the parameter type T. The line number represents the number of lines into a file the current line resides.
        Specified by:
        mapLine in interface LineMapper<java.lang.String>
        Parameters:
        line - to be mapped
        lineNumber - of the current line
        Returns:
        mapped object of type T
        Throws:
        java.lang.Exception - if error occurred while parsing.