Class MutableInt

java.lang.Object
java.lang.Number
pascal.taie.util.MutableInt
All Implemented Interfaces:
Serializable, Comparable<Number>

public class MutableInt extends Number implements Comparable<Number>
A mutable int wrapper.
See Also:
  • Constructor Details

    • MutableInt

      public MutableInt(int initialValue)
      Creates a new MutableInt with the given initial value.
  • Method Details

    • set

      public void set(int newValue)
      Sets the value to newValue.
    • add

      public void add(int delta)
      Adds the given value to the current value.
    • intValue

      public int intValue()
      Specified by:
      intValue in class Number
    • longValue

      public long longValue()
      Specified by:
      longValue in class Number
    • floatValue

      public float floatValue()
      Specified by:
      floatValue in class Number
    • doubleValue

      public double doubleValue()
      Specified by:
      doubleValue in class Number
    • compareTo

      public int compareTo(Number number)
      Specified by:
      compareTo in interface Comparable<Number>
    • 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