Record Class OptionDataDefinition.ConstraintDefinition
java.lang.Object
java.lang.Record
io.github.kaktushose.jdac.definitions.interactions.command.OptionDataDefinition.ConstraintDefinition
- Record Components:
validator- the correspondingValidatorannotation- the corresponding annotation object
- All Implemented Interfaces:
Definition
- Enclosing class:
OptionDataDefinition
public static record OptionDataDefinition.ConstraintDefinition(Validator<?,?> validator, AnnotationDescription<?> annotation)
extends Record
implements Definition
Representation of a parameter constraint defined by a constraint annotation.
-
Constructor Summary
ConstructorsConstructorDescriptionConstraintDefinition(Validator<?, ?> validator, AnnotationDescription<?> annotation) Creates an instance of aConstraintDefinitionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theannotationrecord component.The human-readable name of this definition.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.Validator<?, ?> Returns the value of thevalidatorrecord component.Methods inherited from interface Definition
definitionId
-
Constructor Details
-
ConstraintDefinition
Creates an instance of aConstraintDefinitionrecord class.- Parameters:
validator- the value for thevalidatorrecord componentannotation- the value for theannotationrecord component
-
-
Method Details
-
displayName
Description copied from interface:DefinitionThe human-readable name of this definition.- Specified by:
displayNamein interfaceDefinition
-
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). -
validator
-
annotation
Returns the value of theannotationrecord component.- Returns:
- the value of the
annotationrecord component
-