Enum CommandArgPrefix

  • All Implemented Interfaces:
    Serializable, Comparable<CommandArgPrefix>, org.refcodes.mixin.PrefixAccessor

    public enum CommandArgPrefix
    extends Enum<CommandArgPrefix>
    implements org.refcodes.mixin.PrefixAccessor
    Commonly used prefixes needful for analyzing, parsing or truncating command line arguments and so on.
    • Enum Constant Detail


        public static final CommandArgPrefix WINDOWS_OPTION
        A DOS box option is prefixed with a single slash "/".

        public static final CommandArgPrefix POSIX_SHORT_OPTION
        A command line argument (POSIX) short-option is prefixed with a single hyphen-minus "-".

        public static final CommandArgPrefix POSIX_LONG_OPTION
        A command line argument (POSIX) long-option is prefixed with a double hyphen-minus "--".
    • Method Detail

      • values

        public static CommandArgPrefix[] 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 (CommandArgPrefix c : CommandArgPrefix.values())
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static CommandArgPrefix valueOf​(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.)
        name - the name of the enum constant to be returned.
        the enum constant with the specified name
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getPrefix

        public String getPrefix​()
        Specified by:
        getPrefix in interface org.refcodes.mixin.PrefixAccessor
      • toPrefixes

        public static String[] toPrefixes​()
        Returns an array with all String prefixes as of getPrefix() defined by this enumeration.
        The array with the according prefixes.