Package io.github.dornol.excelkit.core
Record Class ReadResult<T>
java.lang.Object
java.lang.Record
io.github.dornol.excelkit.core.ReadResult<T>
- Type Parameters:
T- The type of the parsed row data- Record Components:
data- The actual parsed objectsuccess- Indicates whether the row was successfully parsed and validatedmessages- Any validation or processing messages (e.g. errors or warnings)
public record ReadResult<T>(@Nullable T data, boolean success, @Nullable List<String> messages)
extends Record
Represents the result of reading a single row from an Excel file.
- Since:
- 2025-07-19
-
Constructor Summary
ConstructorsConstructorDescriptionReadResult(@Nullable T data, boolean success, @Nullable List<String> messages) Creates an instance of aReadResultrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable Tdata()Returns the value of thedatarecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.messages()Returns the value of themessagesrecord component.booleansuccess()Returns the value of thesuccessrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
data
Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-
success
public boolean success()Returns the value of thesuccessrecord component.- Returns:
- the value of the
successrecord component
-
messages
Returns the value of themessagesrecord component.- Returns:
- the value of the
messagesrecord component
-