Package cloud.commandframework
Class CommandComponent<C>
- java.lang.Object
-
- cloud.commandframework.CommandComponent<C>
-
- Type Parameters:
C
- Command sender type
public final class CommandComponent<C> extends java.lang.Object
A single literal or argument component of a command- Since:
- 1.3.0
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
@NonNull CommandArgument<C,?>
getArgument()
Gets the command component argument details@NonNull ArgumentDescription
getArgumentDescription()
Gets the command component description@NonNull Description
getDescription()
Deprecated.for removal since 1.4.0.int
hashCode()
static <C> @NonNull CommandComponent<C>
of(@NonNull CommandArgument<C,?> commandArgument, @NonNull ArgumentDescription commandDescription)
Creates a new CommandComponent with the provided argument and descriptionstatic <C> @NonNull CommandComponent<C>
of(@NonNull CommandArgument<C,?> commandArgument, @NonNull Description commandDescription)
Deprecated.for removal since 1.4.0.@NonNull java.lang.String
toString()
-
-
-
Method Detail
-
getArgument
public @NonNull CommandArgument<C,?> getArgument()
Gets the command component argument details- Returns:
- command component argument details
-
getDescription
@Deprecated public @NonNull Description getDescription()
Deprecated.for removal since 1.4.0. UsegetArgumentDescription()
instead.Gets the command component description- Returns:
- command component description
-
getArgumentDescription
public @NonNull ArgumentDescription getArgumentDescription()
Gets the command component description- Returns:
- command component description
- Since:
- 1.4.0
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
toString
public @NonNull java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
of
@Deprecated public static <C> @NonNull CommandComponent<C> of(@NonNull CommandArgument<C,?> commandArgument, @NonNull Description commandDescription)
Deprecated.for removal since 1.4.0. Useof(CommandArgument, ArgumentDescription)
instead.Creates a new CommandComponent with the provided argument and description- Type Parameters:
C
- Command sender type- Parameters:
commandArgument
- Command Component ArgumentcommandDescription
- Command Component Description- Returns:
- new CommandComponent
-
of
public static <C> @NonNull CommandComponent<C> of(@NonNull CommandArgument<C,?> commandArgument, @NonNull ArgumentDescription commandDescription)
Creates a new CommandComponent with the provided argument and description- Type Parameters:
C
- Command sender type- Parameters:
commandArgument
- Command Component ArgumentcommandDescription
- Command Component Description- Returns:
- new CommandComponent
-
-