Package ghidra.program.model.address

# Class AddressMapImpl

java.lang.Object
ghidra.program.model.address.AddressMapImpl

public class AddressMapImpl extends Object
`AddressMapImpl` provides a stand-alone AddressMap. An AddressMapImpl instance should only be used to decode keys which it has generated. If this map is used for a specific program instance, the map should be discard if any changes are made to that programs address map (e.g., removing or renaming overlay spaces).

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AddressMapImpl()`
  Creates a new AddressMapImpl with a mapID of 0.
  `AddressMapImpl(byte mapID, AddressFactory addrFactory)`
  Creates a new AddressMapImpl with the specified mapID

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Address`
  `decodeAddress(long value)`
  `int`
  `findKeyRange(List<KeyRange> keyRangeList, Address addr)`
  `long`
  `getKey(Address addr)`
  Generate a unique key for the specified addr.
  `List<KeyRange>`
  `getKeyRanges(Address start, Address end)`
  `List<KeyRange>`
  `getKeyRanges(AddressSetView set)`
  `void`
  `reconcile()`
  Reconcile address space changes using associated address factory.

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

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

- ## Constructor Details

  - ### AddressMapImpl

    public AddressMapImpl()
    Creates a new AddressMapImpl with a mapID of 0.

  - ### AddressMapImpl

    public AddressMapImpl(byte mapID, AddressFactory addrFactory)
    Creates a new AddressMapImpl with the specified mapID
    Parameters:
      `mapID` - the 8-bit value is placed in the upper 8 bits of every address encoding.

- ## Method Details

  - ### decodeAddress

    public Address decodeAddress(long value)
    See Also:
      - `AddressMap.decodeAddress(long)`

  - ### getKey

    public long getKey(Address addr)
    Generate a unique key for the specified addr. Only addresses from a single address space or single program should be passed to this method. Only limited checking is not performed in order to improve performance.
    Parameters:
      `addr` - address
    See Also:
      - `AddressMap.getKey(Address, boolean)`

  - ### findKeyRange

    public int findKeyRange(List<KeyRange> keyRangeList, Address addr)
    See Also:
      - `AddressMap.findKeyRange(List, Address)`

  - ### getKeyRanges

    public List<KeyRange> getKeyRanges(Address start, Address end)
    See Also:
      - `AddressMap.getKeyRanges(Address, Address, boolean)`

  - ### getKeyRanges

    public List<KeyRange> getKeyRanges(AddressSetView set)
    See Also:
      - `AddressMap.getKeyRanges(AddressSetView, boolean)`

  - ### reconcile

    public void reconcile()
    Reconcile address space changes using associated address factory. This method should be invoked following an undo/redo (if the associated address factory may have changed) or removal of an overlay memory block.