Package net.runelite.api
Class Query<EntityType,QueryType,QR extends QueryResults>
- java.lang.Object
-
- net.runelite.api.Query<EntityType,QueryType,QR>
-
- Type Parameters:
EntityType- the returned object typeQueryType- the query type
- Direct Known Subclasses:
InventoryItemQuery,LocatableQuery,WidgetItemQuery
public abstract class Query<EntityType,QueryType,QR extends QueryResults> extends java.lang.ObjectA query to search the game for objects that match.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.function.Predicate<EntityType>predicate
-
Constructor Summary
Constructors Modifier Constructor Description protectedQuery()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected java.util.function.Predicate<EntityType>and(java.util.function.Predicate<EntityType> other)Constructs and returns a predicate that will evaluatepredicateand the passed value.abstract QRresult(Client client)Executes the query and filters through possible objects, returning only those who evaluate true usingpredicate.
-
-
-
Field Detail
-
predicate
protected java.util.function.Predicate<EntityType> predicate
-
-
Method Detail
-
result
public abstract QR result(Client client)
Executes the query and filters through possible objects, returning only those who evaluate true usingpredicate.- Parameters:
client- the game client- Returns:
- the matching objects
-
and
protected java.util.function.Predicate<EntityType> and(java.util.function.Predicate<EntityType> other)
Constructs and returns a predicate that will evaluatepredicateand the passed value.- Parameters:
other- the passed predicate- Returns:
- the combined predicate
-
-