Constructor and Description |
---|
ArrayQuery(T... array) |
Modifier and Type | Method and Description |
---|---|
java.util.Collection<T> |
findAll()
Get all of the results in the
Collection |
T |
findFirst()
Get the first result or
null if no results have been found. |
boolean |
forEach(Processor<? super T> consumer)
Process search results one-by-one.
|
AsyncFuture<java.lang.Boolean> |
forEachAsync(Processor<? super T> consumer) |
java.util.Iterator<T> |
iterator() |
T [] |
toArray(T [] a) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
allMatch, allowParallelProcessing, anyMatch, filtering, flatMapping, mapping
public ArrayQuery(T... array)
public java.util.Collection<T> findAll()
Query
Collection
public T findFirst()
Query
null
if no results have been found.public boolean forEach(Processor<? super T> consumer)
Query
consumer
passed.
The consumer might be called on different threads, but by default these calls are mutually exclusive, so no additional
synchronization inside consumer is necessary. If you need to process results in parallel, run forEach()
on
the result of Query.allowParallelProcessing()
.public AsyncFuture<java.lang.Boolean> forEachAsync(Processor<? super T> consumer)
forEachAsync
in interface Query<T>