public static Long parseDecimal ( final String s ) { Long parsed = null ; try { if ( s != null ) { parsed = ( long ) Double . parseDouble ( s ) ; } } catch ( final NumberFormatException e ) { } return parsed ; }
Converts a String into a Long by first parsing it as Double and then casting it to Long .