public final double getAndSet(int i, double newValue) {
    long next = doubleToRawLongBits(newValue);
    return longBitsToDouble(longs.getAndSet(i, next));
  }
public final double getAndSet(int i, double newValue) {
    long next = doubleToRawLongBits(newValue);
    return longBitsToDouble(longs.getAndSet(i, next));
  }
public final double getAndSet ( int i , double newValue ) { long next = doubleToRawLongBits ( newValue ) ; return longBitsToDouble ( longs . getAndSet ( i , next ) ) ; }
Atomically sets the element at position {@code i} to the given value and returns the old value.

@param i the index
@param newValue the new value
@return the previous value
Atomically sets the element at position { @code i } to the given value and returns the old value .