Types

Primitive Types

byte = Byte::TYPE
char = Character::TYPE
short = Short::TYPE
int = Integer::TYPE
long = Long::TYPE
float = Float::TYPE
double = Double::TYPE
boolean = Boolean::TYPE

Type Conversion

byte(number or string or character)
int(number or string or character)
short(number or string)
long(number or string)
float(number or string)
double(number or string)
char(number)
hex(number)
string(object)
e.g.
byte(-126)    ==> new Byte(0x82)
int("123") ==> new Integer(123)
double("123.456") ==> new Double(123.456)
char(65)   ==> 'A'
string([1,2,3]) ==> "[1, 2, 3]"

Type Check

isArray(object)
isFunction(object)
isFunction(object, narg)
object instanceof class

isArray checks if the object is an array. isFunction checks if the object is a function. When narg is specified checks if it is a function with narg parameters. instanceof does the same as Java.

e.g.
isArray([1, 2]) ==> true
isArray(null) ==> false

Back