Class StackVariableComparator

java.lang.Object
ghidra.program.model.listing.StackVariableComparator
All Implemented Interfaces:
Comparator<Object>

public class StackVariableComparator extends Object implements Comparator<Object>
Compares stack variable offsets; has a static factory method to get a StackVariableComparator.
  • Constructor Details

    • StackVariableComparator

      public StackVariableComparator()
  • Method Details

    • compare

      public int compare(Object obj1, Object obj2)
      Compares a stack variable offsets. One or both objects must be a StackVariable.
      Specified by:
      compare in interface Comparator<Object>
      Parameters:
      obj1 - a StackVariable or Integer
      obj2 - a StackVariable or Integer

      Returns:
      a negative integer, zero, or a positive integer if the first argument is less than, equal to, or greater than the second.
    • get

      public static StackVariableComparator get()
      Returns a shared instance of a StackVariableComparator.