public class NumberWithFormat extends Number implements TypeConverter
Constructor and Description |
---|
NumberWithFormat(Number number,
String format)
构造
|
Modifier and Type | Method and Description |
---|---|
Object |
convert(Type targetType,
Object value)
转换为指定类型
如果类型无法确定,将读取默认值的类型做为目标类型 |
double |
doubleValue() |
float |
floatValue() |
Object |
getNumber()
获取原始Number
|
int |
intValue() |
long |
longValue() |
String |
toString() |
byteValue, shortValue
public Object convert(Type targetType, Object value)
TypeConverter
convert
in interface TypeConverter
targetType
- 目标Type,非泛型类使用value
- 原始值public Object getNumber()
public float floatValue()
floatValue
in class Number
public double doubleValue()
doubleValue
in class Number
Copyright © 2024. All rights reserved.