Record Class CsvValidationError
java.lang.Object
java.lang.Record
cloud.opencode.base.csv.validator.CsvValidationError
- Record Components:
rowIndex- 0-based data row index | 0起始的数据行索引column- column name | 列名value- actual value | 实际值rule- rule name (e.g. "notBlank", "range[1.0,100.0]") | 规则名称message- human-readable error message | 人类可读的错误消息
public record CsvValidationError(int rowIndex, String column, String value, String rule, String message)
extends Record
CSV Validation Error - Describes a single validation failure
CSV验证错误 - 描述单个验证失败
Contains all diagnostic information for a validation error including the row index, column name, actual value, rule name, and a human-readable error message.
包含验证错误的所有诊断信息,包括行索引、列名、实际值、规则名称和 人类可读的错误消息。
Usage Examples | 使用示例:
CsvValidationError error = new CsvValidationError(0, "age", "abc", "range[0.0,120.0]",
"Value 'abc' in column 'age' is not a valid number");
- Since:
- JDK 25, opencode-base-csv V1.0.3
- Author:
- Leon Soo www.LeonSoo.com
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCsvValidationError(int rowIndex, String column, String value, String rule, String message) Creates an instance of aCsvValidationErrorrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncolumn()Returns the value of thecolumnrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.message()Returns the value of themessagerecord component.introwIndex()Returns the value of therowIndexrecord component.rule()Returns the value of therulerecord component.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
CsvValidationError
Creates an instance of aCsvValidationErrorrecord class.
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
rowIndex
-
column
-
value
-
rule
-
message
-