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
-
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.Returns the value of thefileIdentifier
record component.static CsvFile
static CsvFile
final int
hashCode()
Returns a hash code value for this object.Returns the value of theheaderFields
record component.boolean
isEmpty()
line
(int lineNumber) lines()
Returns the value of thelines
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
CsvFile
Creates an instance of aCsvFile
record class.- Parameters:
fileIdentifier
- the value for thefileIdentifier
record componentheaderFields
- the value for theheaderFields
record componentlines
- the value for thelines
record 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 thefileIdentifier
record component.- Returns:
- the value of the
fileIdentifier
record component
-
headerFields
Returns the value of theheaderFields
record component.- Returns:
- the value of the
headerFields
record component
-
lines
-