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