Record Class RuleVerdict
java.lang.Object
java.lang.Record
dev.yowsef.stealablock.api.steal.RuleVerdict
-
Constructor Summary
ConstructorsConstructorDescriptionRuleVerdict(boolean allowed, @Nullable String denyMessage) Creates an instance of aRuleVerdictrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull RuleVerdictallow()booleanallowed()Returns the value of theallowedrecord component.booleandenied()static @NotNull RuleVerdict@Nullable StringReturns the value of thedenyMessagerecord component.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.
-
Constructor Details
-
RuleVerdict
Creates an instance of aRuleVerdictrecord class.- Parameters:
allowed- the value for theallowedrecord componentdenyMessage- the value for thedenyMessagerecord component
-
-
Method Details
-
denied
public boolean denied() -
allow
-
deny
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
allowed
public boolean allowed()Returns the value of theallowedrecord component.- Returns:
- the value of the
allowedrecord component
-
denyMessage
Returns the value of thedenyMessagerecord component.- Returns:
- the value of the
denyMessagerecord component
-