private boolean isNegativeNumber ( String token ) { try { Double . parseDouble ( token ) ; return true ; } catch ( NumberFormatException e ) { return false ; } }
Check if the token is a negative number .