public class CollectionResult<T> extends java.lang.Object implements IQueryResult<T>
| Constructor and Description |
|---|
CollectionResult(java.util.Collection<T> collection) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isEmpty()
Returns whether this QueryResult is empty.
|
java.util.Iterator<T> |
iterator()
Returns an iterator on the collected objects.
|
IQueryResult<T> |
query(IQuery<T> query,
IProgressMonitor monitor)
Performs a query, passing any objects that satisfy the
query to the provided collector.
|
T[] |
toArray(java.lang.Class<T> clazz)
Returns the collected objects as an array
|
java.util.Set<T> |
toSet()
Creates a new Set copy with the contents of this query result.
|
java.lang.String |
toString() |
java.util.Set<T> |
toUnmodifiableSet()
Returns a Set backed by this query result.
|
public CollectionResult(java.util.Collection<T> collection)
public IQueryResult<T> query(IQuery<T> query, IProgressMonitor monitor)
IQueryableThis method is long-running; progress and cancellation are provided by the given progress monitor.
query in interface IQueryable<T>query - The query to performmonitor - a progress monitor, or null if progress
reporting is not desiredpublic boolean isEmpty()
IQueryResultisEmpty in interface IQueryResult<T>true if this QueryResult has accepted any results,
and false otherwise.public java.util.Iterator<T> iterator()
IQueryResultiterator in interface java.lang.Iterable<T>iterator in interface IQueryResult<T>public T[] toArray(java.lang.Class<T> clazz)
IQueryResulttoArray in interface IQueryResult<T>clazz - The type of array to returnpublic java.util.Set<T> toSet()
IQueryResulttoSet in interface IQueryResult<T>public java.util.Set<T> toUnmodifiableSet()
IQueryResulttoUnmodifiableSet in interface IQueryResult<T>public java.lang.String toString()
toString in class java.lang.Object
Copyright (c) 2000, 2018 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.