Class MutableInt

java.lang.Object
io.deephaven.util.mutable.MutableInt

public class MutableInt extends Object
Minimal mutable wrapper for an int value. Loosely based on org.apache.commons.lang3.mutable.MutableInt, but without inheriting from Number, or providing any overloads that accept Number or any boxed types.

Deliberately does not extend Number, does not implement toString()/equals/hashcode(), or implement Comparable.

  • Constructor Details

    • MutableInt

      public MutableInt()
    • MutableInt

      public MutableInt(int value)
  • Method Details

    • get

      public int get()
    • set

      public void set(int value)
    • add

      public void add(int addend)
    • addAndGet

      public int addAndGet(int addend)
    • getAndAdd

      public int getAndAdd(int addend)
    • getAndIncrement

      public int getAndIncrement()
    • increment

      public void increment()
    • decrement

      public void decrement()
    • incrementAndGet

      public int incrementAndGet()
    • subtract

      public void subtract(int subtrahend)