Record Class CsvFile
java.lang.Object
java.lang.Record
be.sddevelopment.validation.dsl.CsvFile
- Record Components:
fileIdentifier- a regular expression, used to identify the file in the validation report.headerFields- the header fields of the CSV file.lines- the data lines of the CSV file.
public record CsvFile(String fileIdentifier, Vector<String> headerFields, Vector<Vector<String>> lines)
extends Record
Represents a CSV file with a header and data lines, to be used as an input for a
ModularRuleset.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefileIdentifierrecord component.static CsvFilestatic CsvFilefinal inthashCode()Returns a hash code value for this object.Returns the value of theheaderFieldsrecord component.booleanisEmpty()line(int lineNumber) lines()Returns the value of thelinesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CsvFile
Creates an instance of aCsvFilerecord class.- Parameters:
fileIdentifier- the value for thefileIdentifierrecord componentheaderFields- the value for theheaderFieldsrecord componentlines- the value for thelinesrecord component
-
-
Method Details
-
line
-
fromLines
- Throws:
IOException
-
fromFile
-
isEmpty
public boolean isEmpty() -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
fileIdentifier
Returns the value of thefileIdentifierrecord component.- Returns:
- the value of the
fileIdentifierrecord component
-
headerFields
Returns the value of theheaderFieldsrecord component.- Returns:
- the value of the
headerFieldsrecord component
-
lines
-