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.ObjectA 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 booleanequals(java.lang.Object o)@NonNull CommandArgument<C,?>getArgument()Gets the command component argument details@NonNull ArgumentDescriptiongetArgumentDescription()Gets the command component description@NonNull DescriptiongetDescription()Deprecated.for removal since 1.4.0.inthashCode()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.StringtoString()
-
-
-
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:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
toString
public @NonNull java.lang.String toString()
- Overrides:
toStringin 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
-
-