Class QueryResult<T>
- java.lang.Object
-
- com.epicbot.api.shared.query.result.QueryResult<T>
-
- All Implemented Interfaces:
java.lang.Iterable<T>
,java.util.Collection<T>
- Direct Known Subclasses:
LocatableEntityQueryResult
public class QueryResult<T> extends java.lang.Object implements java.util.Collection<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected APIContext
ctx
-
Constructor Summary
Constructors Constructor Description QueryResult(java.util.List<T> objects, APIContext ctx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(T obj)
boolean
addAll(java.util.Collection<? extends T> c)
void
clear()
boolean
contains(java.lang.Object obj)
boolean
containsAll(java.util.Collection<?> c)
T
first()
boolean
isEmpty()
java.util.Iterator<T>
iterator()
T
last()
QueryResult<T>
limit(int amount)
QueryResult<T>
limit(int startIndex, int amount)
T
random()
boolean
remove(java.lang.Object obj)
boolean
removeAll(java.util.Collection<?> c)
boolean
retainAll(java.util.Collection<?> c)
QueryResult<T>
reverse()
QueryResult<T>
shuffle()
int
size()
QueryResult<T>
sort(java.util.Comparator<? super T> comparator)
java.lang.Object[]
toArray()
<T> T[]
toArray(T[] array)
java.util.List<T>
toList()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Field Detail
-
ctx
protected APIContext ctx
-
-
Constructor Detail
-
QueryResult
public QueryResult(java.util.List<T> objects, APIContext ctx)
-
-
Method Detail
-
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 obj)
- Specified by:
contains
in interfacejava.util.Collection<T>
-
containsAll
public boolean containsAll(java.util.Collection<?> c)
- Specified by:
containsAll
in interfacejava.util.Collection<T>
-
iterator
public java.util.Iterator<T> iterator()
-
toArray
public java.lang.Object[] toArray()
- Specified by:
toArray
in interfacejava.util.Collection<T>
-
toArray
public <T> T[] toArray(T[] array)
- Specified by:
toArray
in interfacejava.util.Collection<T>
-
toList
public java.util.List<T> toList()
-
addAll
public boolean addAll(java.util.Collection<? extends T> c)
- Specified by:
addAll
in interfacejava.util.Collection<T>
-
remove
public boolean remove(java.lang.Object obj)
- Specified by:
remove
in interfacejava.util.Collection<T>
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
- Specified by:
removeAll
in interfacejava.util.Collection<T>
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
- Specified by:
retainAll
in interfacejava.util.Collection<T>
-
clear
public void clear()
- Specified by:
clear
in interfacejava.util.Collection<T>
-
limit
public QueryResult<T> limit(int amount)
-
limit
public QueryResult<T> limit(int startIndex, int amount)
-
sort
public QueryResult<T> sort(java.util.Comparator<? super T> comparator)
-
reverse
public QueryResult<T> reverse()
-
shuffle
public QueryResult<T> shuffle()
-
random
public T random()
-
first
public T first()
-
last
public T last()
-
-