@FunctionalInterface public interface TypeConverter
String
values to a variety of differently-typed
objects.convert(String, Type)
Modifier and Type | Method and Description |
---|---|
<T> T |
convert(String rawValue,
Type type)
|
<T> T convert(String rawValue, Type type)
String
value to an object of the
supplied Type
, and returns it.
Implementations of this method are permitted to return null
.
T
- the type of the return value, assumed to be assignable
to references of the supplied typerawValue
- the String
value to convert; may be
null
type
- the Type
to which the value should be
converted; must not be null
; the type of the return value
resulting from invocations of implementations of this method
should be assignable to references of this typenull
NullPointerException
- if type
is null
IllegalArgumentException
- if conversion could not occur
for any reasonCopyright © 2019–2021, microBean™. All rights reserved.