|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.ocl.internal.evaluation.QueryImpl<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
public class QueryImpl<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
An implementation of the model object 'Query'.
The following features are implemented:
| Constructor Summary | |
|---|---|
QueryImpl(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> environment,
OCLExpression<C> expr,
Map<CLS,? extends Set<? extends E>> extentMap)
|
|
| Method Summary | ||
|---|---|---|
boolean |
check(List<?> objList)
Determines whether all of the input objects satisfy the query. |
|
boolean |
check(Object obj)
Evaluates the query on an object. |
|
Object |
evaluate()
Evaluates the query. |
|
List<?> |
evaluate(List<?> objList)
Evaluates the query on the input list. |
|
Object |
evaluate(Object obj)
Evaluates the query on the object. |
|
EvaluationEnvironment<C,O,P,CLS,E> |
getEvaluationEnvironment()
Obtains the evaluation environment that I use to evaluate OCL expressions. |
|
OCLExpression<C> |
getExpression()
Obtains the expression that I evaluate (or check as a boolean constraint). |
|
Map<CLS,? extends Set<? extends E>> |
getExtentMap()
Obtains the mapping of classes to their extents (sets of all instances). |
|
Diagnostic |
getProblems()
Retrieves the problems available on this problem aware object |
|
String |
queryText()
Translates the query back to an OCL text string. |
|
|
reject(List<T> objList)
Determines the subset of input objects that do not satisfy the query. |
|
C |
resultType()
Obtains the OCL result type of the query. |
|
|
select(List<T> objList)
Determines the subset of input objects that satisfy the query. |
|
String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public QueryImpl(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> environment,
OCLExpression<C> expr,
Map<CLS,? extends Set<? extends E>> extentMap)
environment - expr - extentMap - may be null, in which case I will use my
evaluation environment to create a dynamic extent map| Method Detail |
|---|
public Map<CLS,? extends Set<? extends E>> getExtentMap()
Query
getExtentMap in interface Query<C,CLS,E>OCL.setExtentMap(java.util.Map>) public OCLExpression<C> getExpression()
Query
getExpression in interface Query<C,CLS,E>public Object evaluate(Object obj)
Query
evaluate in interface Query<C,CLS,E>obj - an Object
EObjects, Java objects, a mixture, or even null.
In any case, the results conform to the expression's
result typeQuery.evaluate(),
Query.evaluate(List),
Query.resultType()public Object evaluate()
QueryallInstances()
exclusively for evaluation.
evaluate in interface Query<C,CLS,E>EObjects, Java objects, a mixture, or even null.
In any case, the results conform to the expression's
result typeQuery.resultType()public boolean check(Object obj)
Query
check in interface Query<C,CLS,E>obj - an Object or null if the query
does not require an OCL 'self' context
true or false according to
whether the constraint is metQuery.check(List)public List<?> evaluate(List<?> objList)
Query
evaluate in interface Query<C,CLS,E>objList - a list of objects to evaluate the query on
objects. Note that result elements may, themselves,
be collections of multiple results for a single input object.
In any case, the results conform to the expression's
result typeQuery.evaluate(Object),
Query.resultType()public boolean check(List<?> objList)
Query
check in interface Query<C,CLS,E>objList - a list of objects to evaluate the constraint on
true if all of the objects satisfy
the constraint (including the trivial case of an empty input list);
false, otherwiseQuery.check(Object)public <T> List<T> select(List<T> objList)
Query
select in interface Query<C,CLS,E>objList - a list of objects to evaluate the constraint on
objects that
satisfy the constraintpublic <T> List<T> reject(List<T> objList)
Query
reject in interface Query<C,CLS,E>objList - a list of objects to evaluate the constraint on
objects that
do not satisfy the constraintpublic C resultType()
QueryBoolean.
resultType in interface Query<C,CLS,E>public String queryText()
Query
queryText in interface Query<C,CLS,E>public EvaluationEnvironment<C,O,P,CLS,E> getEvaluationEnvironment()
Query
getEvaluationEnvironment in interface Query<C,CLS,E>public Diagnostic getProblems()
ProblemAware
getProblems in interface ProblemAwarenull in case that no problems are available.public String toString()
toString in class Object
|
Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved. |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||