public void remove(double value){
  if (Double.isNaN(value)) {
    return;
  }
  int index=findInsertIndex(value);
  if (index == -1) {
    throw new IllegalStateException("Value not found in collection");
  }
  Double valueAtIndex=values.get(index);
  if ((valueAtIndex != null) && (!valueAtIndex.equals(value))) {
    throw new IllegalStateException("Value not found in collection");
  }
  values.remove(index);
}

public void remove ( double value ) { if ( Double . isNaN ( value ) ) { return ; } int index = findInsertIndex ( value ) ; if ( index == - 1 ) { throw new IllegalStateException ( "Value not found in collection" ) ; } Double valueAtIndex = values . get ( index ) ; if ( ( valueAtIndex != null ) && ( ! valueAtIndex . equals ( value ) ) ) { throw new IllegalStateException ( "Value not found in collection" ) ; } values . remove ( index ) ; }
remove a value from the collection .
