public class LocaleConverter extends AbstractBaseConverter<Locale>
String
into a Locale
.
For a description of the format, see Locale
and IETF BCP 47.
Example:
@Parameter(names = { "--locale" }, converter = LocaleConverter.class)
private Locale locale;
Locale
failOnNull, targetClass
Constructor and Description |
---|
LocaleConverter(String optionName)
Constructs a converter.
|
Modifier and Type | Method and Description |
---|---|
protected Locale |
convertImpl(String value)
Converts a value.
|
convert, getErrorString, isSingle, newParameterException, newParameterException, split, toInt, toURI
public LocaleConverter(String optionName)
optionName
- The option name, may be null.protected Locale convertImpl(String value)
AbstractBaseConverter
convertImpl
in class AbstractBaseConverter<Locale>
value
- the value to convertCopyright © 2016-2016 Gary Gregory. All Rights Reserved.
Use is subject to The Apache Software License, Version 2.0