public class StateUtilities
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
stateToString(State s)
A standard method for turning an arbitrary
State into a String representation. |
static java.lang.Boolean |
stringOrBoolean(java.lang.Object o)
Takes an input object, typically value to which a variable should be set, that is either a String representation of a boolean, or a
Boolean , and returns the corresponding Boolean . |
static java.lang.Number |
stringOrNumber(java.lang.Object o)
Takes an input object, typically value to which a variable should be set, that is either a String representation of a number, or a
Number , and returns the corresponding Number . |
public static java.lang.Number stringOrNumber(java.lang.Object o)
Number
, and returns the corresponding Number
. If the input is not a number or string
representation of a number, a runtime exception is thrown.o
- the input object that is either a String
or a Number
Number
.public static java.lang.Boolean stringOrBoolean(java.lang.Object o)
Boolean
, and returns the corresponding Boolean
. If the input is not a boolean or string
representation of a boolean, a runtime exception is thrown.o
- the input object that is either a String
or a Boolean
Boolean
.