public static boolean isInteger ( CharSequence self ) { try { Integer . valueOf ( self . toString ( ) . trim ( ) ) ; return true ; } catch ( NumberFormatException nfe ) { return false ; } }
Determine if a CharSequence can be parsed as an Integer .