Enum OptionException.Type

    • Enum Constant Detail

      • INVALID_OPTION_TYPE

        public static final OptionException.Type INVALID_OPTION_TYPE
        Thrown for trying to retrieve an option without a valid type specified.
      • INVALID_RETRIEVAL_TYPE

        public static final OptionException.Type INVALID_RETRIEVAL_TYPE
        Thrown for trying to retrieve single value for multiple value option.
      • UNKNOWN_OPTION

        public static final OptionException.Type UNKNOWN_OPTION
        Thrown for unrecognized option.
      • UNKNOWN_FLAG

        public static final OptionException.Type UNKNOWN_FLAG
        Thrown for unknown flag in concatenated short options.
      • NOT_FLAG

        public static final OptionException.Type NOT_FLAG
        Thrown for value-requiring option in concatenated short options.
      • ILLEGAL_OPTION_VALUE

        public static final OptionException.Type ILLEGAL_OPTION_VALUE
        Thrown for illegal/missing value in value-requiring option.
      • INVALID_OPTION_COUNT

        public static final OptionException.Type INVALID_OPTION_COUNT
        Thrown for invalid option value count.
      • OPTION_HAS_VALUE

        public static final OptionException.Type OPTION_HAS_VALUE
        Thrown for trying to reassign value to single-value option.
      • INVALID_OPTION_VALUE_COUNT

        public static final OptionException.Type INVALID_OPTION_VALUE_COUNT
        Thrown for trying to assign an invalid number of value to option.
    • Method Detail

      • values

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

        public static OptionException.Type 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.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null