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