Package org.rspeer.game.query.results
Class QueryResults<T,QR extends SelfTyped<QR>>
- java.lang.Object
-
- org.rspeer.game.query.results.QueryResults<T,QR>
-
- All Implemented Interfaces:
Iterable<T>,Collection<T>,SelfTyped<QR>
- Direct Known Subclasses:
ComponentQueryResults,ItemQueryResults,RelationshipQueryResults,SceneNodeQueryResults,StockMarketTransactionQueryResults,WorldQueryResults
public abstract class QueryResults<T,QR extends SelfTyped<QR>> extends Object implements Collection<T>, SelfTyped<QR>
-
-
Constructor Summary
Constructors Constructor Description QueryResults(Collection<T> results)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanaccept(Consumer<T> consumer, Function<QR,T> target)booleanadd(T t)booleanaddAll(Collection<? extends T> c)List<T>asList()voidclear()booleancontains(Object o)booleancontainsAll(Collection<?> c)Tfirst()Tget(int index)intindexOf(T o)booleanisEmpty()Iterator<T>iterator()Tlast()intlastIndexOf(T o)QRlimit(int entries)QRlimit(int startIndex, int amount)<K> List<K>map(Function<T,K> mapper)Trandom()booleanremove(Object o)booleanremoveAll(Collection<?> c)booleanretainAll(Collection<?> c)QRreverse()QRshuffle()intsize()QRsort(Comparator<? super T> comparator)Object[]toArray()Deprecated.T[]toArray(Object[] dest)StringtoString()-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
-
-
-
-
Constructor Detail
-
QueryResults
public QueryResults(Collection<T> results)
-
-
Method Detail
-
sort
public final QR sort(Comparator<? super T> comparator)
-
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAllin interfaceCollection<T>
-
get
public T get(int index)
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection<T>
-
lastIndexOf
public int lastIndexOf(T o)
-
addAll
public boolean addAll(Collection<? extends T> c)
- Specified by:
addAllin interfaceCollection<T>
-
limit
public final QR limit(int startIndex, int amount)
-
first
public final T first()
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<T>
-
size
public int size()
- Specified by:
sizein interfaceCollection<T>
-
toArray
public T[] toArray(Object[] dest)
- Specified by:
toArrayin interfaceCollection<T>
-
toArray
@Deprecated public Object[] toArray()
Deprecated.- Specified by:
toArrayin interfaceCollection<T>
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAllin interfaceCollection<T>
-
remove
public boolean remove(Object o)
- Specified by:
removein interfaceCollection<T>
-
add
public boolean add(T t)
- Specified by:
addin interfaceCollection<T>
-
reverse
public final QR reverse()
-
last
public final T last()
-
indexOf
public int indexOf(T o)
-
random
public final T random()
-
contains
public boolean contains(Object o)
- Specified by:
containsin interfaceCollection<T>
-
shuffle
public final QR shuffle()
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAllin interfaceCollection<T>
-
limit
public final QR limit(int entries)
-
-