protected boolean isNumeric(String text){
  text=text.trim();
  int tlen=text.length();
  for (int i=0; i < tlen; i++) {
    if (Character.isDigit(text.charAt(i)) == false) {
      return false;
    }
  }
  return true;
}

protected boolean isNumeric ( String text ) { text = text . trim ( ) ; int tlen = text . length ( ) ; for ( int i = 0 ; i < tlen ; i ++ ) { if ( Character . isDigit ( text . charAt ( i ) ) == false ) { return false ; } } return true ; }
utility method for subclasses to determine if an entire string is digits
