Package ghidra.program.model.address

# Class AddressRangeToAddressComparator

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

All Implemented Interfaces:
  `Comparator<Object>`

public class AddressRangeToAddressComparator extends Object implements Comparator<Object>
Compares an address against an AddressRange.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AddressRangeToAddressComparator()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `compare(Object obj1, Object obj2)`
  Compares an address against an AddressRange.

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

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

  ### Methods inherited from interface java.util.Comparator

  `equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong`

- ## Constructor Details

  - ### AddressRangeToAddressComparator

    public AddressRangeToAddressComparator()

- ## Method Details

  - ### compare

    public int compare(Object obj1, Object obj2)
    Compares an address against an AddressRange.
    Specified by:
      `compare` in interface `Comparator<Object>`
    Parameters:
      `obj1` - the first object to compare. Must be an address or an address range.
      `obj2` - the second object to compare. Must be an address or an address range.
    Returns:
      a negative integer, zero, or a positive integer if the first argument is less than, equal to, or greater than the second.