public interface ValueType<T>
| Modifier and Type | Method and Description |
|---|---|
T |
cast(Object o)
Attempt to cast the passed object to the generic type T.
|
Class<T> |
getDestinationType() |
boolean |
isParsable(String sourceValue)
Returns true if the string can safely be parsed into the destination type
by the parse() method.
|
T |
parse(String sourceValue)
Attempts to parse the passed String into the destinationType.
|
String |
toString(T value)
Converts an instance of the destination type to string.
|
T parse(String sourceValue) throws ParsingException
sourceValue - ParsingException - for any type of failure.String toString(T value)
value - boolean isParsable(String sourceValue)
sourceValue - T cast(Object o) throws RuntimeException
o - RuntimeExceptionCopyright © 2017. All rights reserved.