Class 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

      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      @NonNull CommandArgument<C,​?> getArgument()
      Gets the command component argument details
      @NonNull Description getDescription()
      Gets the command component description
      int hashCode()  
      static <C> @NonNull CommandComponent<C> of​(@NonNull CommandArgument<C,​?> commandArgument, @NonNull Description commandDescription)
      Creates a new CommandComponent with the provided argument and description
      @NonNull java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • getArgument

        public @NonNull CommandArgument<C,​?> getArgument()
        Gets the command component argument details
        Returns:
        command component argument details
      • getDescription

        public @NonNull Description getDescription()
        Gets the command component description
        Returns:
        command component description
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • toString

        public @NonNull java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • of

        public static <C> @NonNull CommandComponent<C> of​(@NonNull CommandArgument<C,​?> commandArgument,
                                                          @NonNull Description commandDescription)
        Creates a new CommandComponent with the provided argument and description
        Type Parameters:
        C - Command sender type
        Parameters:
        commandArgument - Command Component Argument
        commandDescription - Command Component Description
        Returns:
        new CommandComponent