Class QueryResults<T,QR extends QueryResults>
- java.lang.Object
-
- com.runemate.game.api.hybrid.queries.results.QueryResults<T,QR>
-
- All Implemented Interfaces:
java.lang.Iterable<T>
,java.util.Collection<T>
- Direct Known Subclasses:
ActionBarQueryResults
,ChatboxQueryResults
,GrandExchangeQueryResults
,HintArrowQueryResults
,InteractableQueryResults
,WorldQueryResults
public abstract class QueryResults<T,QR extends QueryResults> extends java.lang.Object implements java.util.Collection<T>
-
-
Constructor Summary
Constructors Constructor Description QueryResults(java.util.Collection<? extends T> results)
QueryResults(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 Deprecated Methods Modifier and Type Method Description boolean
add(T t)
boolean
addAll(@NonNull java.util.Collection<? extends T> c)
java.util.List<T>
asList()
Gets a list containing the same elements as the queries results.java.util.Set<T>
asSet()
Gets a set containing the same elements as the queries results.void
clear()
boolean
contains(java.lang.Object o)
boolean
containsAll(@NonNull java.util.Collection<?> c)
T
first()
T
get(int index)
int
indexOf(T o)
boolean
isEmpty()
@NonNull java.util.Iterator<T>
iterator()
T
last()
int
lastIndexOf(T o)
QR
limit(int entries)
Limits the results to the amount specified starting at index 0QR
limit(int startIndex, int amount)
Limits the elements in the list to the amount specified starting at the start indexjava.util.ListIterator<T>
listIterator()
Deprecated.java.util.ListIterator<T>
listIterator(int index)
Deprecated.T
random()
boolean
remove(java.lang.Object o)
boolean
removeAll(@NonNull java.util.Collection<?> c)
boolean
retainAll(@NonNull java.util.Collection<?> c)
QR
reverse()
QR
shuffle()
int
size()
QR
sort(java.util.Comparator<? super T> comparator)
@NonNull T[]
toArray()
@NonNull T[]
toArray(@NonNull java.lang.Object[] array)
java.lang.String
toString()
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
shuffle
public final QR shuffle()
-
reverse
public final QR reverse()
-
limit
public final QR limit(int entries)
Limits the results to the amount specified starting at index 0- Parameters:
entries
- the amount of entries to allow
-
limit
public final QR limit(int startIndex, int amount)
Limits the elements in the list to the amount specified starting at the start index
-
size
public int size()
- Specified by:
size
in interfacejava.util.Collection<T>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfacejava.util.Collection<T>
-
contains
public boolean contains(java.lang.Object o)
- Specified by:
contains
in interfacejava.util.Collection<T>
-
iterator
@NonNull public @NonNull java.util.Iterator<T> iterator()
-
toArray
@NonNull public @NonNull T[] toArray()
- Specified by:
toArray
in interfacejava.util.Collection<T>
-
toArray
@NonNull public @NonNull T[] toArray(@NonNull @NonNull java.lang.Object[] array)
- Specified by:
toArray
in interfacejava.util.Collection<T>
-
remove
public boolean remove(java.lang.Object o)
- Specified by:
remove
in interfacejava.util.Collection<T>
-
containsAll
public boolean containsAll(@NonNull @NonNull java.util.Collection<?> c)
- Specified by:
containsAll
in interfacejava.util.Collection<T>
-
addAll
public boolean addAll(@NonNull @NonNull java.util.Collection<? extends T> c)
- Specified by:
addAll
in interfacejava.util.Collection<T>
-
removeAll
public boolean removeAll(@NonNull @NonNull java.util.Collection<?> c)
- Specified by:
removeAll
in interfacejava.util.Collection<T>
-
retainAll
public boolean retainAll(@NonNull @NonNull java.util.Collection<?> c)
- Specified by:
retainAll
in interfacejava.util.Collection<T>
-
clear
public void clear()
- Specified by:
clear
in interfacejava.util.Collection<T>
-
get
public T get(int index)
-
first
@Nullable public final T first()
-
last
@Nullable public final T last()
-
random
@Nullable public final T random()
-
indexOf
public int indexOf(T o)
-
lastIndexOf
public int lastIndexOf(T o)
-
listIterator
@Deprecated public java.util.ListIterator<T> listIterator()
Deprecated.
-
listIterator
@Deprecated public java.util.ListIterator<T> listIterator(int index)
Deprecated.
-
asList
public java.util.List<T> asList()
Gets a list containing the same elements as the queries results.
-
asSet
public java.util.Set<T> asSet()
Gets a set containing the same elements as the queries results.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-