Class LocatableEntityQueryResults<T extends LocatableEntity>
- java.lang.Object
-
- com.runemate.game.api.hybrid.queries.results.QueryResults<T,QR>
-
- com.runemate.game.api.hybrid.queries.results.InteractableQueryResults<T,LocatableEntityQueryResults<T>>
-
- com.runemate.game.api.hybrid.queries.results.LocatableEntityQueryResults<T>
-
- All Implemented Interfaces:
java.lang.Iterable<T>
,java.util.Collection<T>
public class LocatableEntityQueryResults<T extends LocatableEntity> extends InteractableQueryResults<T,LocatableEntityQueryResults<T>>
-
-
Constructor Summary
Constructors Constructor Description LocatableEntityQueryResults(java.util.Collection<? extends T> results)
LocatableEntityQueryResults(java.util.Collection<? extends T> results, java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.Object> cache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
furthest()
Gets the furthest entity to the local player.T
furthestFrom(Locatable locatable)
T
furthestFrom(Locatable locatable, Distance.Algorithm algorithm)
T
nearest()
Gets the nearest entity to the local player.T
nearest(Distance.Algorithm algorithm)
T
nearestTo(Locatable locatable)
Gets the nearest entity to the given locatable.T
nearestTo(Locatable locatable, Distance.Algorithm algorithm)
LocatableEntityQueryResults<T>
sortByDistance()
Calls sort(Comparator) with a Comparator that will sort the list by distance from the local player (nearest first)LocatableEntityQueryResults<T>
sortByDistance(Distance.Algorithm algorithm)
LocatableEntityQueryResults<T>
sortByDistanceFrom(Locatable center)
Calls sort(Comparator) with a Comparator that will sort the list by distance from the local player (nearest first)LocatableEntityQueryResults<T>
sortByDistanceFrom(Locatable center, Distance.Algorithm algorithm)
-
Methods inherited from class com.runemate.game.api.hybrid.queries.results.InteractableQueryResults
sortByDistanceFrom, sortByDistanceFrom, sortByDistanceFromMouse
-
Methods inherited from class com.runemate.game.api.hybrid.queries.results.QueryResults
add, addAll, asList, asSet, clear, contains, containsAll, first, get, indexOf, isEmpty, iterator, last, lastIndexOf, limit, limit, listIterator, listIterator, random, remove, removeAll, retainAll, reverse, shuffle, size, sort, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Constructor Detail
-
LocatableEntityQueryResults
public LocatableEntityQueryResults(java.util.Collection<? extends T> results)
-
LocatableEntityQueryResults
public LocatableEntityQueryResults(java.util.Collection<? extends T> results, java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.Object> cache)
-
-
Method Detail
-
sortByDistance
public final LocatableEntityQueryResults<T> sortByDistance()
Calls sort(Comparator) with a Comparator that will sort the list by distance from the local player (nearest first)
-
sortByDistance
public final LocatableEntityQueryResults<T> sortByDistance(Distance.Algorithm algorithm)
-
sortByDistanceFrom
public final LocatableEntityQueryResults<T> sortByDistanceFrom(Locatable center)
Calls sort(Comparator) with a Comparator that will sort the list by distance from the local player (nearest first)
-
sortByDistanceFrom
public final LocatableEntityQueryResults<T> sortByDistanceFrom(Locatable center, Distance.Algorithm algorithm)
-
nearest
@Nullable public final T nearest()
Gets the nearest entity to the local player. If two or more entities are tied for the place of nearest then one will be selected according to the active player sense profile.
-
nearest
@Nullable public final T nearest(Distance.Algorithm algorithm)
-
nearestTo
@Nullable public final T nearestTo(Locatable locatable)
Gets the nearest entity to the given locatable. If two or more entities are tied for the place of nearest then one will be selected according to the active player sense profile.
-
nearestTo
@Nullable public final T nearestTo(Locatable locatable, Distance.Algorithm algorithm)
-
furthest
@Nullable public final T furthest()
Gets the furthest entity to the local player. If two or more entities are tied for the place of furthest then one will be selected according to the active player sense profile.
-
furthestFrom
@Nullable public final T furthestFrom(Locatable locatable, Distance.Algorithm algorithm)
-
-