public final T check ( Object object , T defaultValue ) { try { return check ( object ) ; } catch ( ClassCastException e ) { return defaultValue ; } }
Checks and casts an object to the specified type . If casting fails a default value is returned .