code: public double getAndSet(double amount) {
      long v = value.getAndSet(Double.doubleToLongBits(amount));
      return Double.longBitsToDouble(v);
    }
docs: Set the value to  {@code amount} and return the previous value.