Record Class ArgumentRequirement<C extends CommandContext<C>, V>
java.lang.Object
java.lang.Record
site.lab0x13.scrow.commands.model.argument.ArgumentRequirement<C,V>
- Type Parameters:
C- argument of command contextV- argument of argument value
public record ArgumentRequirement<C extends CommandContext<C>, V>(ArgumentPredicate<C extends CommandContext<C>, V> predicate, String errorMessage)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionArgumentRequirement(ArgumentPredicate<C, V> predicate, String errorMessage) Creates an instance of aArgumentRequirementrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theerrorMessagerecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thepredicaterecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ArgumentRequirement
Creates an instance of aArgumentRequirementrecord class.- Parameters:
predicate- the value for thepredicaterecord componenterrorMessage- the value for theerrorMessagerecord 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). -
predicate
Returns the value of thepredicaterecord component.- Returns:
- the value of the
predicaterecord component
-
errorMessage
Returns the value of theerrorMessagerecord component.- Returns:
- the value of the
errorMessagerecord component
-