Record Class CsvExtractSpec
java.lang.Object
java.lang.Record
com.darkcollective.relix.lang.ast.source.CsvExtractSpec
- Record Components:
hasHeader-trueif the first row of the CSV contains column names (which are matched against the schema's column names);falseif columns are matched positionally
- All Implemented Interfaces:
ExtractSpec
Extracts tabular data from a CSV response body.
Syntax: extract: csv(header: true)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CsvExtractSpecConvenience constant: CSV with a header row (the common case).static final CsvExtractSpecConvenience constant: CSV without a header row (positional matching). -
Constructor Summary
ConstructorsConstructorDescriptionCsvExtractSpec(boolean hasHeader) Creates an instance of aCsvExtractSpecrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thehasHeaderrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
WITH_HEADER
Convenience constant: CSV with a header row (the common case). -
WITHOUT_HEADER
Convenience constant: CSV without a header row (positional matching).
-
-
Constructor Details
-
CsvExtractSpec
public CsvExtractSpec(boolean hasHeader) Creates an instance of aCsvExtractSpecrecord class.- Parameters:
hasHeader- the value for thehasHeaderrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 with '=='. -
hasHeader
public boolean hasHeader()Returns the value of thehasHeaderrecord component.- Returns:
- the value of the
hasHeaderrecord component
-