public class LocatableEntityQueryResult<T extends LocatableEntity> extends QueryResult<T>
ctx
Constructor and Description |
---|
LocatableEntityQueryResult(java.util.List<T> objects,
APIContext ctx) |
Modifier and Type | Method and Description |
---|---|
T |
nearest() |
T |
nearest(double near,
double diff)
Gets the nearest entity with allowed variation.
|
java.util.List<T> |
nearestList() |
LocatableEntityQueryResult<T> |
sort(Tile tile) |
add, addAll, clear, contains, containsAll, first, isEmpty, iterator, last, limit, limit, random, remove, removeAll, retainAll, reverse, shuffle, size, sort, toArray, toArray, toList
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public LocatableEntityQueryResult(java.util.List<T> objects, APIContext ctx)
public T nearest()
public T nearest(double near, double diff)
near
- the minimum distance before variation is considered (e.g. when near is 5 and diff is 1, an object with distance 6 is allowed)diff
- the allowed difference between closest and current object being consideredpublic java.util.List<T> nearestList()
public LocatableEntityQueryResult<T> sort(Tile tile)