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 FormatOptionfromOption(String option)Performs a match against the parameterString optionof eachFormatType's option and returns a matching instance.StringgetOption()StringtoString()static FormatOptionvalueOf(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 inMachineReadableReportXML format
-
TEXT
public static final FormatOption TEXT
Output in brief 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
FormatTypeinstance.
-
toString
public String toString()
- Overrides:
toStringin classEnum<FormatOption>
-
fromOption
public static FormatOption fromOption(String option)
Performs a match against the parameterString optionof eachFormatType's option and returns a matching instance. Defaults to returningXMLif no match can be made.- Parameters:
option- the string CLI option to compare- Returns:
- a matching
FormatTypeinstance orXMLif no match can be made.
-
-