Package io.mateu.dtos
Record Class ValidationDto
java.lang.Object
java.lang.Record
io.mateu.dtos.ValidationDto
- Record Components:
message- An text to show if not valid
A field validation
-
Constructor Summary
ConstructorsConstructorDescriptionValidationDto(String condition, String fieldId, String message) Creates an instance of aValidationDtorecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconditionrecord component.final booleanIndicates whether some other object is "equal to" this one.fieldId()Returns the value of thefieldIdrecord component.final inthashCode()Returns a hash code value for this object.message()Returns the value of themessagerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ValidationDto
Creates an instance of aValidationDtorecord class.- Parameters:
condition- the value for theconditionrecord componentfieldId- the value for thefieldIdrecord componentmessage- the value for themessagerecord 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 withObjects::equals(Object,Object). -
condition
Returns the value of theconditionrecord component.- Returns:
- the value of the
conditionrecord component
-
fieldId
Returns the value of thefieldIdrecord component.- Returns:
- the value of the
fieldIdrecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-