Class VerticalComparator

    • Constructor Detail

      • VerticalComparator

        public VerticalComparator()
    • Method Detail

      • compare

        public int compare​(Region region1,
                           Region region2)
        Compares the Y-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 y-position of region1 is smaller
        • 0 if the y-positions are equal
        • 1 if the y-position of region2 is smaller