Package org.verapdf.processor
Enum FormatOption
- java.lang.Object
-
- java.lang.Enum<FormatOption>
-
- org.verapdf.processor.FormatOption
-
- All Implemented Interfaces:
Serializable
,Comparable<FormatOption>
public enum FormatOption extends Enum<FormatOption>
- Author:
- Carl Wilson
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FormatOption
fromOption(String option)
Performs a match against the parameterString option
of eachFormatType
's option and returns a matching instance.String
getOption()
String
toString()
static FormatOption
valueOf(String name)
Returns the enum constant of this type with the specified name.static FormatOption[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
XML
public static final FormatOption XML
Output in XML format
-
MRR
public static final FormatOption MRR
Output inMachineReadableReport
XML format
-
TEXT
public static final FormatOption TEXT
Output in brief format
-
HTML
public static final FormatOption HTML
Output in HTML format
-
JSON
public static final FormatOption JSON
Output in JSON format
-
-
Method Detail
-
values
public static FormatOption[] 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 (FormatOption c : FormatOption.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static FormatOption 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 nameNullPointerException
- if the argument is null
-
getOption
public String getOption()
- Returns:
- the option string for the
FormatType
instance.
-
toString
public String toString()
- Overrides:
toString
in classEnum<FormatOption>
-
fromOption
public static FormatOption fromOption(String option)
Performs a match against the parameterString option
of eachFormatType
's option and returns a matching instance. Defaults to returningXML
if no match can be made.- Parameters:
option
- the string CLI option to compare- Returns:
- a matching
FormatType
instance orXML
if no match can be made.
-
-