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