Class MutableInteger

java.lang.Object
org.deltava.util.MutableInteger
All Implemented Interfaces:
Comparable<MutableInteger>

public class MutableInteger extends Object implements Comparable<MutableInteger>
A class to store mutable Integer values.
Since:
8.7
Version:
11.0
Author:
Luke
  • Constructor Details

    • MutableInteger

      public MutableInteger(int value)
      Creates the integer.
      Parameters:
      value - the initial value
  • Method Details

    • inc

      public void inc()
      Increments the value.
    • intValue

      public int intValue()
      Returns the value as a primitive.
      Returns:
      the value
    • getValue

      public Integer getValue()
      Returns the value as an Object.
      Returns:
      the value
    • toString

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

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

      public int compareTo(MutableInteger i2)
      Specified by:
      compareTo in interface Comparable<MutableInteger>