edu.mayo.bsi.ngsportal.server
Enum GetOpts.OptType

java.lang.Object
  extended by java.lang.Enum<GetOpts.OptType>
      extended by edu.mayo.bsi.ngsportal.server.GetOpts.OptType
All Implemented Interfaces:
Serializable, Comparable<GetOpts.OptType>
Enclosing class:
GetOpts

public static enum GetOpts.OptType
extends Enum<GetOpts.OptType>

Enumerated Type to specify the type of option. You can have multiple kOnlyParam, and also have kOptionalParam and kRequiredParam, but all kOnlyParam must come before any kRequiredParam, or an error will still be reported if have an Only and not one of the otherwise required parameters.
An ignore param, if present, gives the param the user can use to tell GetOpts to ignore any parameters it doesn't recognize (i.e. if the program defines "--ignore" as an Ignore param, and the user specifies --ignore, then any unrecognized parameters will be ignored, rather than generating an error.

Author:
Gregory Dougherty

Enum Constant Summary
kIgnoreParam
          A Parameter that allows the program to ignore unrecognized parameters
kOnlyParam
          Parameter that can be the only parameter (i.e.
kOptionalParam
          Parameter that is optional
kRequiredParam
          Parameter that is required
 
Method Summary
static GetOpts.OptType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static GetOpts.OptType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

kOptionalParam

public static final GetOpts.OptType kOptionalParam
Parameter that is optional


kRequiredParam

public static final GetOpts.OptType kRequiredParam
Parameter that is required


kOnlyParam

public static final GetOpts.OptType kOnlyParam
Parameter that can be the only parameter (i.e. one that gets the version string and then exits


kIgnoreParam

public static final GetOpts.OptType kIgnoreParam
A Parameter that allows the program to ignore unrecognized parameters

Method Detail

values

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

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

valueOf

public static GetOpts.OptType 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