|
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.MatchQuery<T>
public abstract class MatchQuery<T>
This class represents the superclass of most of p2's queries. Every element
in the query can be evaluated by calling isMatch on it. If isMatch(Object)
returns true,
then the element WILL be included in the query result. If isMatch(Object)
returns false, then
the element WILL NOT be included in the query result.
This class may be subclassed by clients. Subclasses should specify the type
of object they support querying on. Subclasses are also encouraged to clearly
specify their match algorithm, and expose the parameters involved in the match
computation, to allow IQueryable
implementations to optimize their
execution of the query.
Constructor Summary | |
---|---|
MatchQuery()
|
Method Summary | |
---|---|
IExpression |
getExpression()
Returns the IExpression backing this query of null if
this is not an expression query. |
abstract boolean |
isMatch(T candidate)
Returns whether the given object satisfies the parameters of this query. |
IQueryResult<T> |
perform(Iterator<T> iterator)
Performs this query on the given iterator, passing all objects in the iterator that match the criteria of this query to the given result. |
void |
postPerform()
Execute any post-processing that must be done after this query has been performed against a particular iterator. |
void |
prePerform()
Execute any pre-processing that must be done before this query is performed against a particular iterator. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MatchQuery()
Method Detail |
---|
public abstract boolean isMatch(T candidate)
isMatch
in interface IMatchQuery<T>
candidate
- The object to perform the query against
true
if the unit satisfies the parameters
of this query, and false
otherwiseperform(Iterator)
public final IQueryResult<T> perform(Iterator<T> iterator)
perform
in interface IQuery<T>
iterator
- The elements for which to evaluate the query on
public void prePerform()
This method is internal to the framework. Subclasses may override this method, but should not call this method.
public void postPerform()
This method will be called even if the query does not complete successfully.
This method is internal to the framework. Subclasses may override this method, but should not call this method.
public IExpression getExpression()
IQuery
null
if
this is not an expression query.
getExpression
in interface IQuery<T>
null
.
|
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.