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 boolean
accept(Consumer<T> consumer, Function<QR,T> target)
boolean
add(T t)
boolean
addAll(Collection<? extends T> c)
List<T>
asList()
void
clear()
boolean
contains(Object o)
boolean
containsAll(Collection<?> c)
T
first()
T
get(int index)
int
indexOf(T o)
boolean
isEmpty()
Iterator<T>
iterator()
T
last()
int
lastIndexOf(T o)
QR
limit(int entries)
QR
limit(int startIndex, int amount)
<K> List<K>
map(Function<T,K> mapper)
T
random()
boolean
remove(Object o)
boolean
removeAll(Collection<?> c)
boolean
retainAll(Collection<?> c)
QR
reverse()
QR
shuffle()
int
size()
QR
sort(Comparator<? super T> comparator)
Object[]
toArray()
Deprecated.T[]
toArray(Object[] dest)
String
toString()
-
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:
retainAll
in interfaceCollection<T>
-
get
public T get(int index)
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceCollection<T>
-
lastIndexOf
public int lastIndexOf(T o)
-
addAll
public boolean addAll(Collection<? extends T> c)
- Specified by:
addAll
in interfaceCollection<T>
-
limit
public final QR limit(int startIndex, int amount)
-
first
public final T first()
-
clear
public void clear()
- Specified by:
clear
in interfaceCollection<T>
-
size
public int size()
- Specified by:
size
in interfaceCollection<T>
-
toArray
public T[] toArray(Object[] dest)
- Specified by:
toArray
in interfaceCollection<T>
-
toArray
@Deprecated public Object[] toArray()
Deprecated.- Specified by:
toArray
in interfaceCollection<T>
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAll
in interfaceCollection<T>
-
remove
public boolean remove(Object o)
- Specified by:
remove
in interfaceCollection<T>
-
add
public boolean add(T t)
- Specified by:
add
in 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:
contains
in interfaceCollection<T>
-
shuffle
public final QR shuffle()
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAll
in interfaceCollection<T>
-
limit
public final QR limit(int entries)
-
-