Package net.emustudio.edigen.ui
Enum Argument.Type
- java.lang.Object
-
- java.lang.Enum<Argument.Type>
-
- net.emustudio.edigen.ui.Argument.Type
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<Argument.Type>
- Enclosing class:
- Argument
public static enum Argument.Type extends java.lang.Enum<Argument.Type>
An argument type.If
arg1is a mandatory argument,-arg2 value2is a value and-arg3is a flag, this is an example of a valid command line input:program arg1 -arg2 value2 -arg3
The order of value and flag arguments is irrelevant. Mandatory arguments must occur in the specified order, but they can interleave with other parameters.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Argument.TypevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static Argument.Type[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
MANDATORY
public static final Argument.Type MANDATORY
A mandatory argument.
-
VALUE
public static final Argument.Type VALUE
An argument with one value (for example-v value).
-
FLAG
public static final Argument.Type FLAG
An argument without any value (a flag, e.g.-f).
-
-
Method Detail
-
values
public static Argument.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 (Argument.Type c : Argument.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 Argument.Type 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 namejava.lang.NullPointerException- if the argument is null
-
-