Record Class StringArgumentType<C extends CommandContext<C>>
java.lang.Object
java.lang.Record
site.lab0x13.scrow.commands.model.argument.types.StringArgumentType<C>
- All Implemented Interfaces:
ArgumentType<C,String>
public record StringArgumentType<C extends CommandContext<C>>(boolean greedy)
extends Record
implements ArgumentType<C,String>
-
Constructor Summary
ConstructorsConstructorDescriptionStringArgumentType(boolean greedy) Creates an instance of aStringArgumentTyperecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.booleangreedy()Returns the value of thegreedyrecord component.final inthashCode()Returns a hash code value for this object.parseInput(String string) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
StringArgumentType
public StringArgumentType() -
StringArgumentType
public StringArgumentType(boolean greedy) Creates an instance of aStringArgumentTyperecord class.- Parameters:
greedy- the value for thegreedyrecord component
-
-
Method Details
-
parseInput
- Specified by:
parseInputin interfaceArgumentType<C extends CommandContext<C>, String>
-
defaultSuggestionProvider
- Specified by:
defaultSuggestionProviderin interfaceArgumentType<C extends CommandContext<C>, String>- Returns:
- default suggestion provider for the argument, if not overwritten by the argument
-
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 with thecomparemethod from their corresponding wrapper classes. -
greedy
public boolean greedy()Returns the value of thegreedyrecord component.- Specified by:
greedyin interfaceArgumentType<C extends CommandContext<C>, String>- Returns:
- the value of the
greedyrecord component
-