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
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
-
VerticalComparator
public VerticalComparator()
-
-
Method Details
-
compare
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
-