public class NumberConversions extends Object
Modifier and Type | Method and Description |
---|---|
static Object |
convertNumber(Object value,
Class<?> targetClass)
Converts the given value to a compatible value for assignment to the
target type.
|
static <T extends Number> |
strictConvertNumber(Object value,
Class<T> targetClass)
Converts the given value to a compatible number value for assignment to the
target type.
|
public static Object convertNumber(Object value, Class<?> targetClass)
value
- the value to be convertedtargetClass
- the target type as a potential left side of assignmentpublic static <T extends Number> T strictConvertNumber(Object value, Class<T> targetClass)
value
- the value to be convertedtargetClass
- the target type as a potential left side of assignmentnull
is returnedCopyright © 2008, 2018 Borland Software Corporation and others. All Rights Reserved.