Package org.sikuli.script.compare
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 Summary
Constructors Constructor Description HorizontalComparator() -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
HorizontalComparator
public HorizontalComparator()
-
-
Method Details
-
compare
Compares the X-Position of twoRegionobjects.- Specified by:
comparein interfaceComparator<Region>- Parameters:
region1- The firstRegionobjectregion2- The secondRegionobject- 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
-