Class JreLongAdder

  • All Implemented Interfaces:
    LongAdder

    final class JreLongAdder
    extends java.lang.Object
    implements LongAdder
    • Field Detail

      • delegate

        private final java.util.concurrent.atomic.LongAdder delegate
    • Constructor Detail

      • JreLongAdder

        JreLongAdder()
    • Method Detail

      • add

        public void add​(long x)
        Description copied from interface: LongAdder
        Add the given value.
        Specified by:
        add in interface LongAdder
        Parameters:
        x - the value to add
        See Also:
        LongAdder.add(long)
      • sum

        public long sum()
        Description copied from interface: LongAdder
        Returns the current sum.
        Specified by:
        sum in interface LongAdder
        See Also:
        LongAdder.sum()
      • reset

        public void reset()
        Description copied from interface: LongAdder
        Resets the variables maintaining the sum to zero.
        Specified by:
        reset in interface LongAdder
        See Also:
        LongAdder.reset()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object