Enum CommandArgPrefix

  • All Implemented Interfaces:
    org.refcodes.mixin.PrefixAccessor


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

      • Nested classes/interfaces inherited from interface org.refcodes.mixin.PrefixAccessor

        org.refcodes.mixin.PrefixAccessor.PrefixBuilder<B extends org.refcodes.mixin.PrefixAccessor.PrefixBuilder<B>>, org.refcodes.mixin.PrefixAccessor.PrefixMutator, org.refcodes.mixin.PrefixAccessor.PrefixProperty
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      POSIX_LONG_OPTION
      A command line argument (POSIX) long-option is prefixed with a double hyphen-minus "--".
      POSIX_SHORT_OPTION
      A command line argument (POSIX) short-option is prefixed with a single hyphen-minus "-".
      WINDOWS_OPTION
      A DOS box option is prefixed with a single slash "/".
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getPrefix​()
      static java.lang.String[] toPrefixes​()
      Returns an array with all String prefixes as of getPrefix() defined by this enumeration.
      static CommandArgPrefix valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static CommandArgPrefix[] values​()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • WINDOWS_OPTION

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

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

        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())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static CommandArgPrefix 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
      • getPrefix

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

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