|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.emf.query.conditions.ConditionPolicy
public abstract class ConditionPolicy
An abstract base class for ConditionPolicy objects.
ConditionPolicy objects are used to help a given
Condition decide on how it should be evaluated as a whole
whenever it is applied over multiple argument objects, since the
Condition could evaluate to true on some of
these objects and false on others. Clients can use the
supplied ConditionPolicy objects or write their own subclasses
to handle complex cases.
| Field Summary | |
|---|---|
static ConditionPolicy |
ALL
A utility ConditionPolicy object to be used when the
client deems that the resultant evaluation is true if and
only if: the Condition object evaluates to
true on all the argument objects, or, when the client
wants that all the Condition objects evaluate to
true on the argument object |
static ConditionPolicy |
ANY
A utility ConditionPolicy object to be used when the
client deems that the resultant evaluation is true if and
only if: the Condition object evaluates to
true on any of the argument objects, or, when the client
wants that any of the Condition objects to evaluate to
true on the argument object |
| Constructor Summary | |
|---|---|
protected |
ConditionPolicy()
A simple constructor |
| Method Summary | |
|---|---|
abstract boolean |
isSatisfied(Condition[] conditions,
Object object)
Answers whether the argument conditions evaluate -collectively- to true or false when applied to the argument
object. |
abstract boolean |
isSatisfied(Condition condition,
Collection objects)
Answers on how the argument Condition evaluates as a whole
on the argument objects collection. |
boolean |
isSatisfied(Condition condition,
Object object)
Answers whether the argument conditions evaluates to true
or false when applied to the argument object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final ConditionPolicy ALL
ConditionPolicy object to be used when the
client deems that the resultant evaluation is true if and
only if: the Condition object evaluates to
true on all the argument objects, or, when the client
wants that all the Condition objects evaluate to
true on the argument object
public static final ConditionPolicy ANY
ConditionPolicy object to be used when the
client deems that the resultant evaluation is true if and
only if: the Condition object evaluates to
true on any of the argument objects, or, when the client
wants that any of the Condition objects to evaluate to
true on the argument object
| Constructor Detail |
|---|
protected ConditionPolicy()
| Method Detail |
|---|
public abstract boolean isSatisfied(Condition condition,
Collection objects)
Condition evaluates as a whole
on the argument objects collection.
condition - The Condition to be evaluated over the objectsobjects - The collection of objects to be passed to the
Condition argument for evaluation
true indicating that the
Condition evaluated successfully on the argument
objects -in accordance to this ConditionPolicy,
false otherwise
public abstract boolean isSatisfied(Condition[] conditions,
Object object)
true or false when applied to the argument
object.
conditions - an array of Condition objects to be evaluated
-collectively in accordance to this
ConditionPolicy- on the argument object.object - The object to be tested by the Condition
objects
true indicating that the argument
Condition objects evaluated successfully -in
accordance to this ConditionPolicy- on the
argument object, false otherwise
public boolean isSatisfied(Condition condition,
Object object)
true
or false when applied to the argument object. This is the
simplest case of evaluation since it only involves one
Condition and one object to test.
condition - The Condition to be evaluated over the object.object - The object to be tested by the Condition object
true indicating that the argument
Condition object evaluated successfully -in
accordance to this ConditionPolicy- on the
argument object, false otherwise
|
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 | |||||||||