public static class CollectionUtils.SortTokensByDistance extends Object implements Comparator<SectorEntityToken>
| Constructor and Description |
|---|
SortTokensByDistance(Vector2f location) |
SortTokensByDistance(Vector2f location,
boolean includeRadius) |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(SectorEntityToken o1,
SectorEntityToken o2)
Compares the distances of two
SectorEntityTokens from a
central location. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongpublic SortTokensByDistance(Vector2f location, boolean includeRadius)
location - The central location to judge distance from.includeRadius - Whether to include collision radius in the
check.public SortTokensByDistance(Vector2f location)
location - The central location to judge distance from.public int compare(SectorEntityToken o1,
SectorEntityToken o2)
SectorEntityTokens from a
central location.compare in interface Comparator<SectorEntityToken>o1 - The first SectorEntityToken.o2 - The second SectorEntityToken.o1 and o2
from location.