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