private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException, InvalidObjectException {
  s.defaultReadObject();
  if (minSmallest > minLargest) {
    throw new InvalidObjectException("Smallest minimum value must be less than largest minimum value");
  }
  if (maxSmallest > maxLargest) {
    throw new InvalidObjectException("Smallest maximum value must be less than largest maximum value");
  }
  if (minLargest > maxLargest) {
    throw new InvalidObjectException("Minimum value must be less than maximum value");
  }
}

private void readObject ( ObjectInputStream s ) throws IOException , ClassNotFoundException , InvalidObjectException { s . defaultReadObject ( ) ; if ( minSmallest > minLargest ) { throw new InvalidObjectException ( "Smallest minimum value must be less than largest minimum value" ) ; } if ( maxSmallest > maxLargest ) { throw new InvalidObjectException ( "Smallest maximum value must be less than largest maximum value" ) ; } if ( minLargest > maxLargest ) { throw new InvalidObjectException ( "Minimum value must be less than maximum value" ) ; } }
restore the state of an valuerange from the stream . check that the values are valid .
