public class TextFragmentRectanglesComparer extends Object implements Comparator<Rectangle>
Represents a class to compare two Rectangle objects. It is used in the context of side-by-side comparison of text fragments in PDF documents.
Constructor and Description |
---|
TextFragmentRectanglesComparer() |
Modifier and Type | Method and Description |
---|---|
int |
compare(Rectangle x,
Rectangle y)
Compares two Rectangle objects.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public final int compare(Rectangle x, Rectangle y)
Compares two Rectangle objects. It takes into account their relative positions. This comparator allows you to sort text fragments or other objects with a rectangular area in reading order - from left to right.
compare
in interface Comparator<Rectangle>
x
- The first Rectangle to compare.y
- The second Rectangle to compare.Copyright © 2025 Aspose. All Rights Reserved.