Enum Argument.StaticArgument

    • Field Detail

      • help

        private java.lang.String help
        Help for using a command.
      • command

        private java.lang.String command
        The case-independent form of the command
      • altCommand

        private java.lang.String[] altCommand
        Alternate commands for a given action
    • Constructor Detail

      • StaticArgument

        private StaticArgument​(java.lang.String s,
                               java.lang.String help,
                               java.lang.String... altCommand)
    • Method Detail

      • values

        public static Argument.StaticArgument[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Argument.StaticArgument c : Argument.StaticArgument.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Argument.StaticArgument valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getHelp

        public java.lang.String getHelp()
        Description copied from interface: Argument
        Returns help for using command.
        Specified by:
        getHelp in interface Argument
      • getArgument

        public java.lang.String getArgument()
        Description copied from interface: Argument
        Returns command in lower-case form.
        Specified by:
        getArgument in interface Argument
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Enum<Argument.StaticArgument>
      • generateCmdUsageInfo

        public java.lang.String generateCmdUsageInfo()
        Description copied from interface: Argument
        Prints usage info for specific command
        Specified by:
        generateCmdUsageInfo in interface Argument