Record Class Validated.Invalid<E,T>
java.lang.Object
java.lang.Record
dev.fforj.Validated.Invalid<E,T>
- All Implemented Interfaces:
Validated<E,T>
public static record Validated.Invalid<E,T> (NonEmptyList<E> errors)
extends Record
implements Validated<E,T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface Validated
Validated.Accumulator<E>, Validated.Bound<T>, Validated.Invalid<E,T>, Validated.Valid<E, T> -
Constructor Summary
ConstructorsConstructorDescriptionInvalid(NonEmptyList<E> errors) Creates an instance of aInvalidrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.errors()Returns the value of theerrorsrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Invalid
Creates an instance of aInvalidrecord class.- Parameters:
errors- the value for theerrorsrecord component
-
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
errors
Returns the value of theerrorsrecord component.- Returns:
- the value of the
errorsrecord component
-