Package io.atomix.raft.zeebe
Record Class EntryValidator.ValidationResult
java.lang.Object
java.lang.Record
io.atomix.raft.zeebe.EntryValidator.ValidationResult
- Enclosing interface:
EntryValidator
public static record EntryValidator.ValidationResult(boolean success, String errorMessage)
extends Record
Result of validating an entry.
-
Constructor Summary
ConstructorsConstructorDescriptionValidationResult(boolean success, String errorMessage) Creates an instance of aValidationResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theerrorMessagerecord component.booleanfailed()final inthashCode()Returns a hash code value for this object.ok()booleansuccess()Returns the value of thesuccessrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ValidationResult
Creates an instance of aValidationResultrecord class.- Parameters:
success- the value for thesuccessrecord componenterrorMessage- the value for theerrorMessagerecord component
-
-
Method Details
-
ok
-
failure
-
failed
public boolean failed() -
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 '=='. -
success
public boolean success()Returns the value of thesuccessrecord component.- Returns:
- the value of the
successrecord component
-
errorMessage
Returns the value of theerrorMessagerecord component.- Returns:
- the value of the
errorMessagerecord component
-