DoubleAdder.Sum Method

Definition

Returns the current sum.

[Android.Runtime.Register("sum", "()D", "GetSumHandler", ApiSince=24)]
public virtual double Sum ();
[<Android.Runtime.Register("sum", "()D", "GetSumHandler", ApiSince=24)>]
abstract member Sum : unit -> double
override this.Sum : unit -> double

Returns

the sum

Attributes

Remarks

Returns the current sum. The returned value is <em>NOT</em> an atomic snapshot; invocation in the absence of concurrent updates returns an accurate result, but concurrent updates that occur while the sum is being calculated might not be incorporated. Also, because floating-point arithmetic is not strictly associative, the returned result need not be identical to the value that would be obtained in a sequential series of updates to a single variable.

Java documentation for java.util.concurrent.atomic.DoubleAdder.sum().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to