| Constructor and Description |
|---|
Int(java.lang.Integer num)
Wraps the given integer, which can be null.
|
Int(java.lang.String str)
Converts the given string to an integer, if it is a valid integer.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Integer |
integer()
Returns the wrapped integer.
|
static Int |
of(java.lang.Integer num)
Returns an Int (integer) for the number.
|
static Int |
of(java.lang.String str)
Returns an Int (integer) for the string.
|
static java.lang.Integer |
toInteger(java.lang.String str)
Returns the str as an integer, or null if it is null or is not a valid integer.
|
public Int(java.lang.String str)
str - the string to parse for the number; can be nullpublic Int(java.lang.Integer num)
num - the number to wrap; can be nullpublic static Int of(java.lang.Integer num)
num - the number to wrap; can be nullpublic static Int of(java.lang.String str)
str - the string to parse for the number; can be nullpublic static java.lang.Integer toInteger(java.lang.String str)
str - the string to parse for the number; can be nullpublic java.lang.Integer integer()