Package ghidra.features.base.codecompare.panel

# Interface ComparisonData

All Known Implementing Classes:
  `AddressSetComparisonData`, `DataComparisonData`, `EmptyComparisonData`, `FunctionComparisonData`

public interface ComparisonData
ComparisonData is an abstraction of items that can be compared in a `CodeComparisonView`. Not all comparison panels can handle all types of comparison data. For example, the decompiler comparison only works when the comparison data is a function.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final ComparisonData`
  `EMPTY`
  `static final Color`
  `FG_COLOR_TITLE`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `AddressSetView`
  `getAddressSet()`
  Returns the set of addresses being compared.
  `String`
  `getDescription()`
  Returns a description of the data being compared.
  `Function`
  `getFunction()`
  Returns the function being compared or null if this comparison data is not function based.
  `ProgramLocation`
  `getInitialLocation()`
  Returns the initial program location to put the cursor when the panel is first displayed
  `Program`
  `getProgram()`
  Returns the program containing the data being compared.
  `String`
  `getShortDescription()`
  Returns a short description (useful for tab name)
  `boolean`
  `isEmpty()`
  Returns true if this comparison has no addresses to compare

- ## Field Details

  - ### FG_COLOR_TITLE

    static final Color FG_COLOR_TITLE

  - ### EMPTY

    static final ComparisonData EMPTY

- ## Method Details

  - ### getFunction

    Function getFunction()
    Returns the function being compared or null if this comparison data is not function based.
    Returns:
      the function being compared or null if this comparison data is not function based

  - ### getAddressSet

    AddressSetView getAddressSet()
    Returns the set of addresses being compared. Currently, all comparisons are address based, so this should never be null.
    Returns:
      the set of addresses being compared

  - ### getProgram

    Program getProgram()
    Returns the program containing the data being compared.
    Returns:
      the program containing the data being compared.

  - ### getDescription

    String getDescription()
    Returns a description of the data being compared.
    Returns:
      a description of the data being compared.

  - ### getShortDescription

    String getShortDescription()
    Returns a short description (useful for tab name)
    Returns:
      a short description

  - ### isEmpty

    boolean isEmpty()
    Returns true if this comparison has no addresses to compare
    Returns:
      true if this comparison has no addresses to compare

  - ### getInitialLocation

    ProgramLocation getInitialLocation()
    Returns the initial program location to put the cursor when the panel is first displayed
    Returns:
      the location