public class NumberUtils extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static class |
NumberUtils.FormatProperty |
| 限定符 | 构造器和说明 |
|---|---|
private |
NumberUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
format(Number num,
NumberUtils.FormatProperty formatProperty) |
private static boolean |
hasFormat(NumberUtils.FormatProperty formatProperty) |
private static Number |
parse(String string,
NumberUtils.FormatProperty formatProperty) |
static BigDecimal |
parseBigDecimal(String string,
NumberUtils.FormatProperty formatProperty) |
static Byte |
parseByte(String string,
NumberUtils.FormatProperty formatProperty) |
static Double |
parseDouble(String string,
NumberUtils.FormatProperty formatProperty) |
static Float |
parseFloat(String string,
NumberUtils.FormatProperty formatProperty) |
static Integer |
parseInteger(String string,
NumberUtils.FormatProperty formatProperty)
parse Integer from string
|
static Long |
parseLong(String string,
NumberUtils.FormatProperty formatProperty) |
static Short |
parseShort(String string,
NumberUtils.FormatProperty formatProperty) |
private static boolean hasFormat(NumberUtils.FormatProperty formatProperty)
public static String format(Number num, NumberUtils.FormatProperty formatProperty)
public static Short parseShort(String string, NumberUtils.FormatProperty formatProperty) throws ParseException
ParseExceptionpublic static Long parseLong(String string, NumberUtils.FormatProperty formatProperty) throws ParseException
ParseExceptionpublic static Integer parseInteger(String string, NumberUtils.FormatProperty formatProperty) throws ParseException
string - An integer read in string formatformatProperty - Properties of the content read inParseException - exceptionpublic static Float parseFloat(String string, NumberUtils.FormatProperty formatProperty) throws ParseException
ParseExceptionpublic static BigDecimal parseBigDecimal(String string, NumberUtils.FormatProperty formatProperty) throws ParseException
ParseExceptionpublic static Byte parseByte(String string, NumberUtils.FormatProperty formatProperty) throws ParseException
ParseExceptionpublic static Double parseDouble(String string, NumberUtils.FormatProperty formatProperty) throws ParseException
ParseExceptionprivate static Number parse(String string, NumberUtils.FormatProperty formatProperty) throws ParseException
ParseExceptionCopyright © 2023. All rights reserved.