public static Number extractNumber(Object value){
  NumberFormat numberFormat=NumberFormat.getInstance();
  if (value instanceof Number) {
    return (Number)value;
  }
 else   if (value == null) {
    return new Long(0);
  }
 else {
    try {
      return numberFormat.parse(value.toString());
    }
 catch (    ParseException ex) {
      DTThrowable.rethrow(ex);
    }
  }
  return new Long(0);
}

public static Number extractNumber ( Object value ) { NumberFormat numberFormat = NumberFormat . getInstance ( ) ; if ( value instanceof Number ) { return ( Number ) value ; } else if ( value == null ) { return new Long ( 0 ) ; } else { try { return numberFormat . parse ( value . toString ( ) ) ; } catch ( ParseException ex ) { DTThrowable . rethrow ( ex ) ; } } return new Long ( 0 ) ; }
returns the number value of the supplied object
