List of utility methods to do Object Create
T | as(Class as return clazz.cast(instance);
|
T | as(Class Returns the specified object as the specified class or returns null if the cast is not supported. if (cls.isInstance(o)) { return cls.cast(o); return null; |
T | as(Class as return t.isInstance(o) ? t.cast(o) : null;
|
T | as(Class Casts entity to targetClass or return null, if it is impossible T result = null; if ((entity != null) && targetClass.isAssignableFrom(entity.getClass())) { result = (T) entity; return result; |
T | as(Class as if (type.isInstance(value)) { return type.cast(value); return null; |
T | as(Class if o is of the given type, returns o cast to it; otherwise returns null. if (type.isInstance(o)) { return (T) o; return null; |
T | as(Object cst) as return (T) cst;
|
T | as(Object instance, Class as if (clazz.isAssignableFrom(instance.getClass())) { return clazz.cast(instance); return null; |
T | as(Object o) as return (T) o;
|
T | as(Object o, Class Attempts to cast to the specified type, returns null if not castable. if (o == null) return null; if (!clazz.isAssignableFrom(o.getClass())) return null; return (T) o; |