org.crosswire.common.options

## Enum ArgumentType

- java.lang.Object
- - java.lang.Enum<ArgumentType>
  - - org.crosswire.common.options.ArgumentType

- All Implemented Interfaces:
    Serializable, Comparable<ArgumentType>

      public enum ArgumentType
      extends Enum<ArgumentType>

  An ArgumentType indicates whether and/or how an Option is followed by an argument.
  Author:
    DM Smith
  See Also:
    `The GNU Lesser General Public License for details.`

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `NO_ARGUMENT` The option is not followed by an argument.
    `OPTIONAL_ARGUMENT` The option may be followed by an argument.
    `REQUIRED_ARGUMENT` The option is followed by an argument.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private String` | `name` The name of the DataType

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ArgumentType` | `fromString(String name)` Lookup method to find an ArgumentType by name
    `String` | `toString()`
    `static ArgumentType` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static ArgumentType[]` | `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, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### NO_ARGUMENT

          public static final ArgumentType NO_ARGUMENT

      The option is not followed by an argument.

    - #### REQUIRED_ARGUMENT

          public static final ArgumentType REQUIRED_ARGUMENT

      The option is followed by an argument.

    - #### OPTIONAL_ARGUMENT

          public static final ArgumentType OPTIONAL_ARGUMENT

      The option may be followed by an argument.

  - ### Field Detail

    - #### name

          private String name

      The name of the DataType

  - ### Method Detail

    - #### values

          public static ArgumentType[] 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 (ArgumentType c : ArgumentType.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static ArgumentType 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

    - #### fromString

          public static ArgumentType fromString(String name)

      Lookup method to find an ArgumentType by name
      Parameters:
        `name` - the name of the ArgumentType
      Returns:
        the ArgumentType or null

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Enum<ArgumentType>`