2015-11-02 12:39:44 -08:00
|
|
|
package WayofTime.bloodmagic.util;
|
2015-10-29 20:22:14 -07:00
|
|
|
|
|
|
|
public class Utils {
|
|
|
|
|
|
|
|
public static boolean isInteger(String integer) {
|
|
|
|
try {
|
|
|
|
Integer.parseInt(integer);
|
|
|
|
} catch(NumberFormatException e) {
|
|
|
|
return false;
|
|
|
|
} catch(NullPointerException e) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
// only got here if we didn't return false
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|