Record Class StringArgumentType<T>
java.lang.Object
java.lang.Record
de.kentoj.kencommandapi.api.argument.types.StringArgumentType<T>
- All Implemented Interfaces:
ArgumentType<T,String>
public record StringArgumentType<T>(boolean greedy)
extends Record
implements ArgumentType<T,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.parseInputUnchecked(String string) parses the given input and returns it.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
-
parseInputUnchecked
Description copied from interface:ArgumentTypeparses the given input and returns it. UnlikeCommandArgumentSpec.parseInput(String), this does not check any additional requirements.- Specified by:
parseInputUncheckedin interfaceArgumentType<T,String> - See Also:
-
getDefaultSuggestionProvider
- Specified by:
getDefaultSuggestionProviderin interfaceArgumentType<T,String> - See Also:
-
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<T,String> - Returns:
- the value of the
greedyrecord component
-