public final class Comparators extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T extends HasGeometry> |
areaIncreaseThenAreaComparator(Rectangle r) |
static <T,S extends Geometry> |
ascendingDistance(Rectangle r)
Returns a comparator that can be used to sort entries returned by search
methods.
|
static <T extends HasGeometry> |
overlapAreaThenAreaIncreaseThenAreaComparator(Rectangle r,
List<T> list) |
public static <T extends HasGeometry> Comparator<HasGeometry> overlapAreaThenAreaIncreaseThenAreaComparator(Rectangle r, List<T> list)
public static <T extends HasGeometry> Comparator<HasGeometry> areaIncreaseThenAreaComparator(Rectangle r)
public static <T,S extends Geometry> Comparator<Entry<T,S>> ascendingDistance(Rectangle r)
Returns a comparator that can be used to sort entries returned by search methods. For example:
search(100).toSortedList(ascendingDistance(r))
T - the value typeS - the entry typer - rectangle to measure distance toCopyright © 2013–2023. All rights reserved.