Package org.sikuli.script.compare
Class VerticalComparator
- java.lang.Object
-
- org.sikuli.script.compare.VerticalComparator
-
- All Implemented Interfaces:
Comparator<Region>
public class VerticalComparator extends Object implements Comparator<Region>
Compares the Regions by y-position.
-
-
Constructor Summary
Constructors Constructor Description VerticalComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(Region region1, Region region2)Compares the Y-Position of twoRegionobjects.-
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
-
-
-
-
Method Detail
-
compare
public int compare(Region region1, Region region2)
Compares the Y-Position of twoRegionobjects.- Specified by:
comparein interfaceComparator<Region>- Parameters:
region1- The firstRegionobjectregion2- The secondRegionobject- Returns:
- -1 if the y-position of region1 is smaller
- 0 if the y-positions are equal
- 1 if the y-position of region2 is smaller
-
-