|
Eclipse Platform Release 3.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.equinox.p2.query.CollectionResult<T>
public class CollectionResult<T>
This class allows to adapt java collections to a p2 a query result and as such something queryable
Constructor Summary | |
---|---|
CollectionResult(Collection<T> collection)
|
Method Summary | |
---|---|
boolean |
isEmpty()
Returns whether this QueryResult is empty. |
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(Class<T> clazz)
Returns the collected objects as an array |
Set<T> |
toSet()
Creates a new Set copy with the contents of this query result. |
Set<T> |
toUnmodifiableSet()
Returns a Set backed by this query result. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CollectionResult(Collection<T> collection)
Method Detail |
---|
public IQueryResult<T> query(IQuery<T> query, IProgressMonitor monitor)
IQueryable
This 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 desired
public boolean isEmpty()
IQueryResult
isEmpty
in interface IQueryResult<T>
true
if this QueryResult has accepted any results,
and false
otherwise.public Iterator<T> iterator()
IQueryResult
iterator
in interface IQueryResult<T>
public T[] toArray(Class<T> clazz)
IQueryResult
toArray
in interface IQueryResult<T>
clazz
- The type of array to return
public Set<T> toSet()
IQueryResult
toSet
in interface IQueryResult<T>
public Set<T> toUnmodifiableSet()
IQueryResult
toUnmodifiableSet
in interface IQueryResult<T>
|
Eclipse Platform Release 3.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.