Class FloatArgument<C>
- java.lang.Object
-
- cloud.commandframework.arguments.CommandArgument<C,java.lang.Float>
-
- cloud.commandframework.arguments.standard.FloatArgument<C>
-
- All Implemented Interfaces:
java.lang.Comparable<CommandArgument<?,?>>
public final class FloatArgument<C> extends CommandArgument<C,java.lang.Float>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFloatArgument.Builder<C>static classFloatArgument.FloatParseExceptionstatic classFloatArgument.FloatParser<C>
-
Method Summary
Modifier and Type Method Description floatgetMax()Get the maximum accepted float that could have been parsedfloatgetMin()Get the minimum accepted float that could have been parsedstatic <C> @NonNull FloatArgument.Builder<C>newBuilder(@NonNull java.lang.String name)Create a new builderstatic <C> @NonNull CommandArgument<C,java.lang.Float>of(@NonNull java.lang.String name)Create a new required command argumentstatic <C> @NonNull CommandArgument<C,java.lang.Float>optional(@NonNull java.lang.String name)Create a new optional command argumentstatic <C> @NonNull CommandArgument<C,java.lang.Float>optional(@NonNull java.lang.String name, float defaultNum)Create a new required command argument with a default value-
Methods inherited from class cloud.commandframework.arguments.CommandArgument
addPreprocessor, compareTo, copy, equals, getDefaultValue, getName, getOwningCommand, getParser, getSuggestionsProvider, getValueType, hasDefaultValue, hashCode, isArgumentRegistered, isRequired, ofType, ofType, preprocess, setArgumentRegistered, setOwningCommand, toString
-
-
-
-
Method Detail
-
newBuilder
public static <C> @NonNull FloatArgument.Builder<C> newBuilder(@NonNull java.lang.String name)
Create a new builder- Type Parameters:
C- Command sender type- Parameters:
name- Name of the argument- Returns:
- Created builder
-
of
public static <C> @NonNull CommandArgument<C,java.lang.Float> of(@NonNull java.lang.String name)
Create a new required command argument- Type Parameters:
C- Command sender type- Parameters:
name- Argument name- Returns:
- Created argument
-
optional
public static <C> @NonNull CommandArgument<C,java.lang.Float> optional(@NonNull java.lang.String name)
Create a new optional command argument- Type Parameters:
C- Command sender type- Parameters:
name- Argument name- Returns:
- Created argument
-
optional
public static <C> @NonNull CommandArgument<C,java.lang.Float> optional(@NonNull java.lang.String name, float defaultNum)
Create a new required command argument with a default value- Type Parameters:
C- Command sender type- Parameters:
name- Argument namedefaultNum- Default num- Returns:
- Created argument
-
getMin
public float getMin()
Get the minimum accepted float that could have been parsed- Returns:
- Minimum float
-
getMax
public float getMax()
Get the maximum accepted float that could have been parsed- Returns:
- Maximum float
-
-