Class EventSequenceComparator

java.lang.Object
org.eclipse.compare.EventSequenceComparator
All Implemented Interfaces:
IRangeComparator

public class EventSequenceComparator extends Object implements IRangeComparator
  • Field Details

  • Constructor Details

    • EventSequenceComparator

      public EventSequenceComparator(List<EventSequence> esList)
  • Method Details

    • getRangeCount

      public int getRangeCount()
      Description copied from interface: IRangeComparator
      Returns the number of comparable entities.
      Specified by:
      getRangeCount in interface IRangeComparator
      Returns:
      the number of comparable entities
    • rangesEqual

      public boolean rangesEqual(int idx, IRangeComparator rc2, int idx2)
      Description copied from interface: IRangeComparator
      Returns whether the comparable entity given by the first index matches an entity specified by the other IRangeComparator and index.
      Specified by:
      rangesEqual in interface IRangeComparator
      Parameters:
      idx - the index of the comparable entity within this IRangeComparator
      rc2 - the IRangeComparator to compare this with
      idx2 - the index of the comparable entity within the other IRangeComparator
      Returns:
      true if the comparable entities are equal
    • skipRangeComparison

      public boolean skipRangeComparison(int length, int maxLength, IRangeComparator other)
      Description copied from interface: IRangeComparator
      Returns whether a comparison should be skipped because it would be too costly (or lengthy).
      Specified by:
      skipRangeComparison in interface IRangeComparator
      Parameters:
      length - a number on which to base the decision whether to return true or false
      maxLength - another number on which to base the decision whether to return true or false
      other - the other IRangeComparator to compare with
      Returns:
      true to avoid a too lengthy range comparison
    • getItem

      public EventSequence getItem(int idx)