Class HorizontalComparator

    • Constructor Detail

      • HorizontalComparator

        public HorizontalComparator()
    • Method Detail

      • 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