Class CommonNameResolver.DoubleAdderResolver

java.lang.Object
org.eclipse.mat.inspections.CommonNameResolver.DoubleAdderResolver
All Implemented Interfaces:
IClassSpecificNameResolver
Enclosing class:
CommonNameResolver

public static class CommonNameResolver.DoubleAdderResolver extends Object implements IClassSpecificNameResolver
Resolves the current sum of a DoubleAdder from its internal Striped64 representation.

Striped64 stores double values as raw IEEE 754 bit patterns in long fields (base and each Cell.value) so that the JVM's integer-width compare-and-swap instruction can be used — there is no native atomic CAS on double. Each field must therefore be decoded with Double.longBitsToDouble(long) before accumulation; summing the raw long representations directly would produce nonsense. The initial value of base in a freshly constructed DoubleAdder is 0L, which correctly decodes to 0.0.