public class TypeConversion extends Object
Flag> accessors. Type conversion is a function taking
a argument String value and returns its representation in another type. Clients can register own
type conversions and override the default conversions, including String.| Modifier and Type | Class and Description |
|---|---|
static interface |
TypeConversion.Conversion<T>
Converts
String value of a flag into the desired type. |
| Constructor and Description |
|---|
TypeConversion() |
| Modifier and Type | Method and Description |
|---|---|
<T> TypeConversion.Conversion<T> |
forType(Class<T> type)
Returns type-conversion function for given type.
|
<T> void |
register(Class<T> type,
java.util.function.Function<String,T> conversion)
Registers a type conversion.
|
<T> void |
unregister(Class<T> type)
Unregisters type conversion
|
public <T> TypeConversion.Conversion<T> forType(Class<T> type)
public <T> void register(Class<T> type, java.util.function.Function<String,T> conversion)
public <T> void unregister(Class<T> type)
Copyright © 2016. All rights reserved.