public class Helpers
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Helpers.IDType
Type of ID's to use in
getNewId(IDType) |
| Constructor and Description |
|---|
Helpers() |
| Modifier and Type | Method and Description |
|---|---|
static int |
addSafe(int a,
int b)
Take the sum of these two values capped at
Integer.MAX_VALUE. |
static int |
getNewId(Helpers.IDType type)
Get a new ID for the given type.
|
static java.lang.Object |
tryParse(java.lang.String newValue,
java.lang.Object oldValue)
Safe parsing of a string to it's real object type.
|
public static java.lang.Object tryParse(java.lang.String newValue,
java.lang.Object oldValue)
newValue - The value to parseoldValue - The old value that has a certain type.public static int getNewId(Helpers.IDType type)
type - Type for a IConfigurable.public static int addSafe(int a,
int b)
Integer.MAX_VALUE.a - Integerb - Integer