Class HorizontalComparator

java.lang.Object
org.sikuli.script.compare.HorizontalComparator
All Implemented Interfaces:
Comparator<Region>

public class HorizontalComparator
extends Object
implements Comparator<Region>
Compares the Regions by x-position.
  • Constructor Details

  • Method Details

    • compare

      public int compare​(Region region1, Region region2)
      Compares the X-Position of two Region objects.
      Specified by:
      compare in interface Comparator<Region>
      Parameters:
      region1 - The first Region object
      region2 - The second Region object
      Returns:
      • -1 if the x-position of region1 is smaller
      • 0 if the x-positions are equal
      • 1 if the x-position of region2 is smaller