List of utility methods to do Object Type Case
byte | cast(int value) cast return value > Byte.MAX_VALUE ? Byte.MAX_VALUE : value < Byte.MIN_VALUE ? Byte.MIN_VALUE : (byte) value; |
int | cast(long value) cast return value > Integer.MAX_VALUE ? Integer.MAX_VALUE : value < Integer.MIN_VALUE ? Integer.MIN_VALUE : (int) value; |
T | cast(Object inValue) cast return cast(inValue, null);
|
T | cast(Object o) Perform an unchecked cast. return (T) o;
|
T | cast(Object o, Class extends T> clazz) cast if (o == null || clazz == null || !clazz.isAssignableFrom(o.getClass())) return null; return clazz.cast(o); |
T | cast(Object o, Class Cast an object savely. if (klass.isInstance(o)) { return (T) o; return null; |
T | cast(Object o, String clazz) cast return (T) Class.forName(clazz).cast(o);
|
T | cast(Object obj, Class From a type point of view, this works ... return clazz.cast(obj);
|
T | cast(Object obj, Class cast return type.isInstance(obj) ? type.cast(obj) : null;
|
T | cast(Object object) Type casts an input object to class indicated by TypeToken return (T) (object);
|