public static class CollectionUtils.SortTokensByDistance extends Object implements Comparator<SectorEntityToken>
Constructor and Description |
---|
CollectionUtils.SortTokensByDistance(Vector2f location) |
CollectionUtils.SortTokensByDistance(Vector2f location,
boolean includeRadius) |
Modifier and Type | Method and Description |
---|---|
int |
compare(SectorEntityToken o1,
SectorEntityToken o2)
Compares the distances of two
SectorEntityToken s from a
central location. |
public CollectionUtils.SortTokensByDistance(Vector2f location, boolean includeRadius)
location
- The central location to judge distance from.includeRadius
- Whether to include collision radius in the
check.
public CollectionUtils.SortTokensByDistance(Vector2f location)
location
- The central location to judge distance from.
public int compare(SectorEntityToken o1, SectorEntityToken o2)
SectorEntityToken
s from a
central location.compare
in interface Comparator<SectorEntityToken>
o1
- The first SectorEntityToken
.o2
- The second SectorEntityToken
.
o1
and o2
from location
.