public boolean checkValue(final Object value){
  if (value instanceof Double) {
    return true;
  }
 else   if (value instanceof String) {
    try {
      Double.parseDouble((String)value);
      return true;
    }
 catch (    Exception e) {
      return false;
    }
  }
 else {
    throw new IllegalArgumentException();
  }
}

public boolean checkValue ( final Object value ) { if ( value instanceof Double ) { return true ; } else if ( value instanceof String ) { try { Double . parseDouble ( ( String ) value ) ; return true ; } catch ( Exception e ) { return false ; } } else { throw new IllegalArgumentException ( ) ; } }
checks the value to make sure it ' s a legitimate value for this column .
