public static int asInt(String value,int defaultValue){
  if (value != null) {
    try {
      return Integer.parseInt(value);
    }
 catch (    NumberFormatException e) {
    }
  }
  return defaultValue;
}

public static int asInt ( String value , int defaultValue ) { if ( value != null ) { try { return Integer . parseInt ( value ) ; } catch ( NumberFormatException e ) { } } return defaultValue ; }
parse the supplied string as a integer value .
