Class LongLongAccumulator

java.lang.Object
com.hazelcast.jet.accumulator.LongLongAccumulator

public class LongLongAccumulator extends Object
Mutable container of two long values.
Since:
Jet 3.0
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new instance with values equal to 0.
    LongLongAccumulator(long value1, long value2)
    Creates a new instance with the specified values.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add1(long amount)
    Adds the supplied amount to the first value.
    void
    add2(long amount)
    Adds the supplied amount to the second value.
    boolean
     
    long
    Returns the first value.
    long
    Returns the second value.
    int
     
    void
    set1(long value1)
    Sets the first value.
    void
    set2(long value2)
    Sets the second value.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • LongLongAccumulator

      public LongLongAccumulator()
      Creates a new instance with values equal to 0.
    • LongLongAccumulator

      public LongLongAccumulator(long value1, long value2)
      Creates a new instance with the specified values.
  • Method Details

    • get1

      public long get1()
      Returns the first value.
    • set1

      public void set1(long value1)
      Sets the first value.
    • get2

      public long get2()
      Returns the second value.
    • set2

      public void set2(long value2)
      Sets the second value.
    • add1

      public void add1(long amount)
      Adds the supplied amount to the first value.
    • add2

      public void add2(long amount)
      Adds the supplied amount to the second value.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object