Package ghidra.util.map

# Class IntValueMap

java.lang.Object
ghidra.util.map.ValueMap<Integer>
ghidra.util.map.IntValueMap

All Implemented Interfaces:
  `Serializable`

public class IntValueMap extends ValueMap<Integer>
Handles general storage and retrieval of int values indexed by long keys.

See Also:
  - Serialized Form

- ## Field Summary

  ### Fields inherited from class ghidra.util.map.ValueMap

  `noValueException, numProperties, pageSize, propertyPageIndex`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `IntValueMap(String name)`
  Constructor for IntValueMap.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getDataSize()`
  Returns the size (in bytes) of the data that is stored in this property set.
  `int`
  `getInt(long index)`
  Retrieves the int value stored at the given index.
  `protected void`
  `moveIndex(long from, long to)`
  `void`
  `putInt(long index, int value)`
  Stores an int value at the given index.
  `protected void`
  `restoreProperty(ObjectInputStream ois, long index)`
  `protected void`
  `saveProperty(ObjectOutputStream oos, long index)`

  ### Methods inherited from class ghidra.util.map.ValueMap

  `getFirstPropertyIndex, getIndex, getLastPropertyIndex, getName, getNextPropertyIndex, getObjectClass, getOrCreatePage, getPage, getPageID, getPageOffset, getPreviousPropertyIndex, getPropertyIterator, getPropertyIterator, getPropertyIterator, getPropertyIterator, getPropertyIterator, getSize, hasProperty, intersects, moveRange, remove, removeRange, restoreProperties, saveProperties`

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

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

- ## Constructor Details

  - ### IntValueMap

    public IntValueMap(String name)
    Constructor for IntValueMap.
    Parameters:
      `name` - the name associated with this property set

- ## Method Details

  - ### getDataSize

    public int getDataSize()
    Description copied from class: `ValueMap`
    Returns the size (in bytes) of the data that is stored in this property set.
    Specified by:
      `getDataSize` in class `ValueMap<Integer>`
    Returns:
      the size (in bytes) of the data that is stored in this property set.
    See Also:
      - `ValueMap.getDataSize()`

  - ### putInt

    public void putInt(long index, int value)
    Stores an int value at the given index. Any value currently at that index will be replaced by the new value.
    Parameters:
      `index` - the index at which to store the int value.
      `value` - the int value to store.

  - ### getInt

    public int getInt(long index) throws NoValueException
    Retrieves the int value stored at the given index.
    Parameters:
      `index` - the index at which to retrieve the int value.
    Returns:
      int the value stored at the given index.
    Throws:
      `NoValueException` - if there is no int value stored at the index.

  - ### moveIndex

    protected void moveIndex(long from, long to)
    Specified by:
      `moveIndex` in class `ValueMap<Integer>`

  - ### saveProperty

    protected void saveProperty(ObjectOutputStream oos, long index) throws IOException
    Specified by:
      `saveProperty` in class `ValueMap<Integer>`
    Throws:
      `IOException`

  - ### restoreProperty

    protected void restoreProperty(ObjectInputStream ois, long index) throws IOException
    Specified by:
      `restoreProperty` in class `ValueMap<Integer>`
    Throws:
      `IOException`