Class RecordWrapper<T>

  • Type Parameters:
    T - the record type

    public final class RecordWrapper<T>
    extends java.lang.Object
    A wrapper for a record that contains information necessary for the CsvReader in order to determine how to process the record.
    • Constructor Summary

      Constructors 
      Constructor Description
      RecordWrapper​(boolean comment, boolean emptyLine, int fieldCount, T wrappedRecord)
      Constructs a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getFieldCount()
      Returns the number of fields in the record.
      T getWrappedRecord()
      Returns the actual record to be returned by the CsvReader.
      boolean isComment()
      Returns whether the record denotes a comment.
      boolean isEmptyLine()
      Returns whether the record is empty.
      • Methods inherited from class java.lang.Object

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

      • comment

        private final boolean comment
      • emptyLine

        private final boolean emptyLine
      • fieldCount

        private final int fieldCount
      • wrappedRecord

        private final T wrappedRecord
    • Method Detail

      • isComment

        public boolean isComment()
        Returns whether the record denotes a comment.

        This method is only used if the CsvReader is configured to skip comments.

        Returns:
        true if the record denotes a comment
      • isEmptyLine

        public boolean isEmptyLine()
        Returns whether the record is empty.

        This method is only used if the CsvReader is configured to skip empty lines.

        Returns:
        true if the record is empty
      • getFieldCount

        public int getFieldCount()
        Returns the number of fields in the record.

        This method is only used if the CsvReader is configured to check the number of fields in each record.

        Returns:
        the number of fields in the record
      • getWrappedRecord

        public T getWrappedRecord()
        Returns the actual record to be returned by the CsvReader.
        Returns:
        the actual record to be returned by the CsvReader, never null