public class IntegerUtils
extends java.lang.Object
| Constructor and Description |
|---|
IntegerUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
createInteger(java.lang.String value,
int failureInteger)
Convert a String to an Integer
|
static int |
createInteger(java.lang.String value,
java.lang.String exceptionMessage)
Convert a String to an Integer
|
static boolean |
isInteger(java.lang.String value)
Checks if an String is an integer.
|
public static final int createInteger(java.lang.String value,
int failureInteger)
value - - the text value to convert to an integerfailureInteger - - if the conversion fails then return this integer.public static final int createInteger(java.lang.String value,
java.lang.String exceptionMessage)
value - - the text value to convert to an integerexceptionMessage - - A NumberFormatException with this message is thrown if not a valid integer.public static final boolean isInteger(java.lang.String value)
value - - the text value to convert to an integer