public class Numbers extends Object
| Constructor and Description |
|---|
Numbers() |
| Modifier and Type | Method and Description |
|---|---|
static Integer |
safeParseInteger(Object object)
Tries to parse the
String representation of the given object (as
per String.valueOf(Object)) as an Integer. |
static Integer |
safeParseInteger(Object object,
Integer defaultValue)
Tries to parse the
String representation of the given object (as
per String.valueOf(Object)) as an Integer. |
static Long |
safeParseLong(Object object)
Tries to parse the
String representation of the given object (as
per String.valueOf(Object)) as a Long. |
static Long |
safeParseLong(Object object,
Long defaultValue)
Tries to parse the
String representation of the given object (as
per String.valueOf(Object)) as a Long. |
public static Integer safeParseInteger(Object object)
String representation of the given object (as
per String.valueOf(Object)) as an Integer.object - The object to parseInteger, or null if the object could
not be parsedpublic static Integer safeParseInteger(Object object, Integer defaultValue)
String representation of the given object (as
per String.valueOf(Object)) as an Integer.object - The object to parsedefaultValue - The value to return if the object is null or can not
be parsed as an Integernull if the object could not be
parsedpublic static Long safeParseLong(Object object)
String representation of the given object (as
per String.valueOf(Object)) as a Long.object - The object to parseLong, or null if the object could not
be parsedpublic static Long safeParseLong(Object object, Long defaultValue)
String representation of the given object (as
per String.valueOf(Object)) as a Long.object - The object to parsedefaultValue - The value to return if the object is null or can not
be parsed as an Longnull if the object could not be
parsedCopyright © 2026. All rights reserved.