V - constraint on the type of values being converted topublic interface ValueConverter<V>
| Modifier and Type | Method and Description |
|---|---|
V |
convert(String value)
Converts the given string value into a Java type.
|
default String |
revert(Object value)
Reverts a value to a string representation.
|
String |
valuePattern()
Gives a string that describes the pattern of the values this converter expects, if any.
|
Class<? extends V> |
valueType()
Gives the class of the type of values this converter converts to.
|
V convert(String value)
value - the string to convertValueConversionException - if a problem occurs while converting the valuedefault String revert(Object value)
Reverts a value to a string representation.
It is not strictly required that revert(convert(v)).equals(v),
but it is recommended.
value - a valueClass<? extends V> valueType()
String valuePattern()
date format string.null if there's nothing interesting here© Copyright 2004-2016 Paul R. Holser, Jr. All rights reserved. Licensed under The MIT License.