Record Class WalkResult.ArgumentIllegal<C extends CommandContext<C>>
java.lang.Object
java.lang.Record
site.lab0x13.scrow.commands.parser.WalkResult.ArgumentIllegal<C>
- All Implemented Interfaces:
WalkResult<C>
- Enclosing interface:
WalkResult<C extends CommandContext<C>>
public static record WalkResult.ArgumentIllegal<C extends CommandContext<C>>(C extends CommandContext<C> ctx, Literal<C extends CommandContext<C>> lastLiteral, boolean isValidUsage, String message, Argument<C extends CommandContext<C>, ?> arg, String input)
extends Record
implements WalkResult<C>
-
Nested Class Summary
Nested classes/interfaces inherited from interface WalkResult
WalkResult.ArgumentExpected<C>, WalkResult.ArgumentIllegal<C>, WalkResult.Complete<C>, WalkResult.LiteralExpected<C>, WalkResult.LiteralUnknown<C> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionarg()Returns the value of theargrecord component.ctx()Returns the value of thectxrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.input()Returns the value of theinputrecord component.booleanReturns the value of theisValidUsagerecord component.Returns the value of thelastLiteralrecord component.message()Returns the value of themessagerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ArgumentIllegal
public ArgumentIllegal(C ctx, Literal<C> lastLiteral, boolean isValidUsage, String message, Argument<C, ?> arg, String input) Creates an instance of aArgumentIllegalrecord class.- Parameters:
ctx- the value for thectxrecord componentlastLiteral- the value for thelastLiteralrecord componentisValidUsage- the value for theisValidUsagerecord componentmessage- the value for themessagerecord componentarg- the value for theargrecord componentinput- the value for theinputrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
ctx
Returns the value of thectxrecord component.- Specified by:
ctxin interfaceWalkResult<C extends CommandContext<C>>- Returns:
- the value of the
ctxrecord component
-
lastLiteral
Returns the value of thelastLiteralrecord component.- Specified by:
lastLiteralin interfaceWalkResult<C extends CommandContext<C>>- Returns:
- the value of the
lastLiteralrecord component
-
isValidUsage
public boolean isValidUsage()Returns the value of theisValidUsagerecord component.- Specified by:
isValidUsagein interfaceWalkResult<C extends CommandContext<C>>- Returns:
- the value of the
isValidUsagerecord component
-
message
Returns the value of themessagerecord component.- Specified by:
messagein interfaceWalkResult<C extends CommandContext<C>>- Returns:
- the value of the
messagerecord component
-
arg
-
input
Returns the value of theinputrecord component.- Returns:
- the value of the
inputrecord component
-