Package htsjdk.samtools.cram.common

# 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 Summary

Fields
Modifier and Type
Field
Description
`int`
`value`

## Constructor Summary

Constructors
Constructor
Description
`MutableInt()`
Create a mutable integer with initial value 0.
`MutableInt(int initialValue)`
Create a mutable integer with initial value `initialValue`.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object o)`
`int`
`hashCode()`
`MutableInt`
`incrementValue(int increment)`
Increment the current value by `initialValue`.

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

## 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`