Record Class ArgumentData<T>
java.lang.Object
java.lang.Record
org.skriptlang.skript.bukkit.command.custom.ArgumentData<T>
- Type Parameters:
T- The type of the argument.- Record Components:
name- The name of the argument.isAutomaticName- Whethernamewas automatically generated.type- The type of the argument.defaultValue- The default value of the argument, if specified.min- A minimum (inclusive) permitted value for this argument. Null if there is no minimum.max- A maximum (inclusive) permitted value for this argument. Null if there is no maximum.
-
Constructor Summary
ConstructorsConstructorDescriptionArgumentData(String name, boolean isAutomaticName, ClassInfo<T> type, boolean isSingle, @Nullable Expression<T> defaultValue, T min, T max) Creates an instance of aArgumentDatarecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable Expression<T> Returns the value of thedefaultValuerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theisAutomaticNamerecord component.booleanisSingle()Returns the value of theisSinglerecord component.max()Returns the value of themaxrecord component.min()Returns the value of theminrecord component.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
ArgumentData
public ArgumentData(String name, boolean isAutomaticName, ClassInfo<T> type, boolean isSingle, @Nullable @Nullable Expression<T> defaultValue, @Nullable T min, @Nullable T max) Creates an instance of aArgumentDatarecord class.- Parameters:
name- the value for thenamerecord componentisAutomaticName- the value for theisAutomaticNamerecord componenttype- the value for thetyperecord componentisSingle- the value for theisSinglerecord componentdefaultValue- the value for thedefaultValuerecord componentmin- the value for theminrecord componentmax- the value for themaxrecord 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. -
name
-
isAutomaticName
public boolean isAutomaticName()Returns the value of theisAutomaticNamerecord component.- Returns:
- the value of the
isAutomaticNamerecord component
-
type
-
isSingle
public boolean isSingle()Returns the value of theisSinglerecord component.- Returns:
- the value of the
isSinglerecord component
-
defaultValue
Returns the value of thedefaultValuerecord component.- Returns:
- the value of the
defaultValuerecord component
-
min
-
max
-