public static long toLongWithDefault ( Object value , long defaultValue ) { Long result = toNullableLong ( value ) ; return result != null ? ( long ) result : defaultValue ; }
Converts value into integer or returns default when conversion is not possible .