Enum ValidatorCLI.Option
- java.lang.Object
-
- java.lang.Enum<ValidatorCLI.Option>
-
- org.openstreetmap.josm.data.validation.ValidatorCLI.Option
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ValidatorCLI.Option>
- Enclosing class:
- ValidatorCLI
private static enum ValidatorCLI.Option extends java.lang.Enum<ValidatorCLI.Option>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CHANGE_FILE
--change-file=<change-file> Add a change fileDEBUG
--debug Set logging level to debugHELP
--help Show the help for validateINPUT
--input=<input-file> Set the current input fileLANGUAGE
--language=<language> Set the languageLOAD_PREFERENCES
--load-preferences=<url-to-xml> Changes preferences according to the XML fileOUTPUT
--output=<output-file> Set the output file for the current input fileSET
--set=<key>=<value> Set preference key to valueTRACE
--trace Set logging level to traceWARN
--warn Set logging level to warn
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
name
private OptionParser.OptionCount
optionCount
private boolean
requiresArgument
private char
shortOption
-
Constructor Summary
Constructors Modifier Constructor Description private
Option(boolean requiresArgument, char shortOption)
private
Option(boolean requiresArgument, char shortOption, OptionParser.OptionCount optionCount)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
Replies the option nameOptionParser.OptionCount
getOptionCount()
Get the number of times this option should be seenchar
getShortOption()
Replies the short option (single letter) associated with this option.boolean
requiresArgument()
Determines if this option requires an argument.static ValidatorCLI.Option
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ValidatorCLI.Option[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
HELP
public static final ValidatorCLI.Option HELP
--help Show the help for validate
-
INPUT
public static final ValidatorCLI.Option INPUT
--input=<input-file> Set the current input file
-
OUTPUT
public static final ValidatorCLI.Option OUTPUT
--output=<output-file> Set the output file for the current input file
-
CHANGE_FILE
public static final ValidatorCLI.Option CHANGE_FILE
--change-file=<change-file> Add a change file
-
WARN
public static final ValidatorCLI.Option WARN
--warn Set logging level to warn
-
DEBUG
public static final ValidatorCLI.Option DEBUG
--debug Set logging level to debug
-
TRACE
public static final ValidatorCLI.Option TRACE
--trace Set logging level to trace
-
LANGUAGE
public static final ValidatorCLI.Option LANGUAGE
--language=<language> Set the language
-
LOAD_PREFERENCES
public static final ValidatorCLI.Option LOAD_PREFERENCES
--load-preferences=<url-to-xml> Changes preferences according to the XML file
-
SET
public static final ValidatorCLI.Option SET
--set=<key>=<value> Set preference key to value
-
-
Field Detail
-
name
private final java.lang.String name
-
requiresArgument
private final boolean requiresArgument
-
shortOption
private final char shortOption
-
optionCount
private final OptionParser.OptionCount optionCount
-
-
Constructor Detail
-
Option
private Option(boolean requiresArgument, char shortOption)
-
Option
private Option(boolean requiresArgument, char shortOption, OptionParser.OptionCount optionCount)
-
-
Method Detail
-
values
public static ValidatorCLI.Option[] 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 (ValidatorCLI.Option c : ValidatorCLI.Option.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ValidatorCLI.Option 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
-
getName
public java.lang.String getName()
Replies the option name- Returns:
- The option name, in lowercase
-
getOptionCount
public OptionParser.OptionCount getOptionCount()
Get the number of times this option should be seen- Returns:
- The option count
-
getShortOption
public char getShortOption()
Replies the short option (single letter) associated with this option.- Returns:
- the short option or '*' if there is no short option
-
requiresArgument
public boolean requiresArgument()
Determines if this option requires an argument.- Returns:
true
if this option requires an argument,false
otherwise
-
-