Class MutableInt

java.lang.Object
htsjdk.samtools.cram.common.MutableInt

public final class MutableInt extends Object
Mutable integer class suitable for use with collection classes that take a type parameter.
  • Field Details

    • value

      public int value
  • Constructor Details

    • MutableInt

      public MutableInt()
      Create a mutable integer with initial value 0.
    • MutableInt

      public MutableInt(int initialValue)
      Create a mutable integer with initial value initialValue.
      Parameters:
      initialValue -
  • Method Details

    • incrementValue

      public MutableInt incrementValue(int increment)
      Increment the current value by initialValue.
      Parameters:
      increment -
      Returns:
      The updated object
    • hashCode

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

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