| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Query<C,CLS,E>
An OCL constraint or query. The query is validated for correctness when it is created. The query can subsequently be evaluated on a single object or on multiple objects in one operation.
 See the Environment class for a description of the
 generic type parameters of this class. 
 
| Method Summary | ||
|---|---|---|
 boolean | 
check(java.util.List<?> objects)
Determines whether all of the input objects satisfy the query.  | 
|
 boolean | 
check(java.lang.Object obj)
Evaluates the query on an object.  | 
|
 java.lang.Object | 
evaluate()
Evaluates the query.  | 
|
 java.util.List<?> | 
evaluate(java.util.List<?> objects)
Evaluates the query on the input list.  | 
|
 java.lang.Object | 
evaluate(java.lang.Object obj)
Evaluates the query on the object.  | 
|
 EvaluationEnvironment<C,?,?,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).  | 
|
 java.util.Map<CLS,? extends java.util.Set<? extends E>> | 
getExtentMap()
Obtains the mapping of classes to their extents (sets of all instances).  | 
|
 java.lang.String | 
queryText()
Translates the query back to an OCL text string.  | 
|
 | 
reject(java.util.List<T> objects)
Determines the subset of input objects that do not satisfy the query.  | 
|
 C | 
resultType()
Obtains the OCL result type of the query.  | 
|
 | 
select(java.util.List<T> objects)
Determines the subset of input objects that satisfy the query.  | 
|
| Method Detail | 
|---|
EvaluationEnvironment<C,?,?,CLS,E> getEvaluationEnvironment()
java.lang.Object evaluate(java.lang.Object obj)
obj - an Object
EObjects, Java objects, a mixture, or even null.
    In any case, the results conform to the expression's
    result typeevaluate(), 
evaluate(List), 
resultType()java.lang.Object evaluate()
allInstances()
 exclusively for evaluation.
EObjects, Java objects, a mixture, or even null.
    In any case, the results conform to the expression's
    result typeresultType()boolean check(java.lang.Object obj)
obj - an Object or null if the query
     does not require an OCL 'self' context
true or false according to
     whether the constraint is metcheck(List)java.util.List<?> evaluate(java.util.List<?> objects)
objects - 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 typeevaluate(Object), 
resultType()boolean check(java.util.List<?> objects)
objects - 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, otherwisecheck(Object)<T> java.util.List<T> select(java.util.List<T> objects)
objects - a list of objects to evaluate the constraint on
objects that
      satisfy the constraint<T> java.util.List<T> reject(java.util.List<T> objects)
objects - a list of objects to evaluate the constraint on
objects that
      do not satisfy the constraintC resultType()
Boolean.
java.lang.String queryText()
java.util.Map<CLS,? extends java.util.Set<? extends E>> getExtentMap()
OCL.setExtentMap(java.util.Map>) OCLExpression<C> getExpression()
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||