Package org.lazywizard.lazylib
Class CollectionUtils.SortTokensByDistance
Object
SortTokensByDistance
- All Implemented Interfaces:
Comparator<SectorEntityToken>
- Enclosing class:
- CollectionUtils
public static class CollectionUtils.SortTokensByDistance
extends Object
implements Comparator<SectorEntityToken>
- Since:
- 1.1
-
Constructor Summary
ConstructorsConstructorDescriptionSortTokensByDistance(Vector2f location) SortTokensByDistance(Vector2f location, boolean includeRadius) -
Method Summary
Modifier and TypeMethodDescriptionintCompares the distances of twoSectorEntityTokens from a central location.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
SortTokensByDistance
- Parameters:
location- The central location to judge distance from.includeRadius- Whether to include collision radius in the check.- Since:
- 1.6
-
SortTokensByDistance
- Parameters:
location- The central location to judge distance from.- Since:
- 1.1
-
-
Method Details
-
compare
Compares the distances of twoSectorEntityTokens from a central location.- Specified by:
comparein interfaceComparator<SectorEntityToken>- Parameters:
o1- The firstSectorEntityToken.o2- The secondSectorEntityToken.- Returns:
- A comparison of the distances of
o1ando2fromlocation. - Since:
- 1.1
-