Package ghidra.features.base.codecompare.listing

# Class LinearAddressCorrelation

java.lang.Object
ghidra.features.base.codecompare.listing.LinearAddressCorrelation

All Implemented Interfaces:
  `ListingAddressCorrelation`

public class LinearAddressCorrelation extends Object implements ListingAddressCorrelation
Creates an address correlation with a simplistic correlation where each address correlates based on an offset from the address set's minimum address.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LinearAddressCorrelation(Duo<ComparisonData> comparisonData)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Address`
  `getAddress(Duo.Side side, Address otherAddress)`
  Gets the address for the given side that matches the given address from the other side.
  `AddressSetView`
  `getAddresses(Duo.Side side)`
  Gets the addresses that are part of the correlator for the given side
  `Function`
  `getFunction(Duo.Side side)`
  Gets the function for the given side.
  `Program`
  `getProgram(Duo.Side side)`
  Gets the program for the given side.

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

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

- ## Constructor Details

  - ### LinearAddressCorrelation

    public LinearAddressCorrelation(Duo<ComparisonData> comparisonData)

- ## Method Details

  - ### getProgram

    public Program getProgram(Duo.Side side)
    Description copied from interface: `ListingAddressCorrelation`
    Gets the program for the given side.
    Specified by:
      `getProgram` in interface `ListingAddressCorrelation`
    Parameters:
      `side` - LEFT or RIGHT
    Returns:
      the program for the given side

  - ### getAddresses

    public AddressSetView getAddresses(Duo.Side side)
    Description copied from interface: `ListingAddressCorrelation`
    Gets the addresses that are part of the correlator for the given side
    Specified by:
      `getAddresses` in interface `ListingAddressCorrelation`
    Parameters:
      `side` - LEFT or RIGHT
    Returns:
      the addresses that are part of the correlator for the given side

  - ### getFunction

    public Function getFunction(Duo.Side side)
    Description copied from interface: `ListingAddressCorrelation`
    Gets the function for the given side. This will be null if the addresses are not function based.
    Specified by:
      `getFunction` in interface `ListingAddressCorrelation`
    Parameters:
      `side` - LEFT or RIGHT
    Returns:
      the function for the given side or null if not function based

  - ### getAddress

    public Address getAddress(Duo.Side side, Address otherAddress)
    Description copied from interface: `ListingAddressCorrelation`
    Gets the address for the given side that matches the given address from the other side.
    Specified by:
      `getAddress` in interface `ListingAddressCorrelation`
    Parameters:
      `side` - the side to get an address for
      `otherAddress` - the address from the other side to find a match for
    Returns:
      the address for the given side that matches the given address from the other side.