|
 |
|
|
org.eclipse.emf.query.conditions.eobjects.structuralfeatures
Class EObjectStructuralFeatureValueCondition
java.lang.Object
org.eclipse.emf.query.conditions.Condition
org.eclipse.emf.query.conditions.eobjects.EObjectCondition
org.eclipse.emf.query.conditions.eobjects.structuralfeatures.EObjectStructuralFeatureCondition
org.eclipse.emf.query.conditions.eobjects.structuralfeatures.EObjectStructuralFeatureValueCondition
-
Direct Known Subclasses:
-
EObjectAttributeValueCondition,
EObjectReferenceValueCondition
-
public abstract class EObjectStructuralFeatureValueCondition
- extends
EObjectStructuralFeatureCondition
An EObjectStructuralFeatureCondition specialization and the
base class of conditions that test for the values held by the various
EStructuralFeature . This condition can handle both
single-valued and multiple-valued EStructuralFeatures.
It is important to know the following about how evaluation is carried out by
this condition:
- If a contextEObjectCondition is supplied, the
EObject
being evaluated will have to satisfy it first before having its
EStructuralFeature examined.
-
- If the
EObject passed for the isSatisfied(EObject) method
of this condition does not have the EStructuralFeature in
question then resultant evaluation of this condition will be
false .
- If the
EStructuralFeature in question in not set -i.e.,
calling eIsSet() method on the EStructuralFeature returns
false , no further evaluation is done on the
EStructuralFeature and the resultant evaluation of this
condition will be false
.
- If the value of a single-valued
EStructuralFeature is
null , then no further evaluation is done on the
EStructuralFeature and the resultant evaluation of this
condition will be false
- If the collection returned as a value of a multiple-valued
EStructuralFeature is empty, then no further evaluation is
done on the EStructuralFeature and the resultant evaluation of
this condition will be false
-
See Also:
-
IEStructuralFeatureValueGetter ,
ConditionPolicy
Method Summary
|
ConditionPolicy
|
getPolicy
()
Accessor method for the policy argument used in initialization of this
condition |
protected
EObjectCondition
|
getStructuralFeatureCondition
()
Accessor method for the the EObjectCondition that is used
for actual testing of EStructuralFeature 's value in order
to determine if it satisfies this condition or not. |
protected boolean
|
isResolve
()
Accessor method for the resolve argument used in initialization of this
condition |
boolean
|
isSatisfied
(
EObject eObject)
Checks the value held by the initialization
EStructuralFeature to see if it satisfies this condition. |
Methods inherited from class java.lang.
Object
|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
|
EObjectStructuralFeatureValueCondition
public EObjectStructuralFeatureValueCondition(
PruneHandler pruneHandler,
EObjectCondition contextEObjectCondition,
EStructuralFeature feature,
IEStructuralFeatureValueGetter eStructuralFeatureValueGetter,
boolean resolve,
Condition valueCondition,
ConditionPolicy policy)
- The constructor of this EObjectStructuralFeatureValueCondition object, it
initializes it with the proper values.
-
Parameters:
-
pruneHandler - The PruneHandler to use -
contextEObjectCondition - an optional EObjectCondition to use to check
the context EObject which is the
EObject passed to the isSatisfied(EObject)
method for evaluation, which also serves as the context within
which the EStructuralFeature 's value exists
-and hence the name. This contextEObjectCondition is optional
and hence could be null
-
feature - The EStructuralFeature to check its value -
eStructuralFeatureValueGetter - The IEStructuralFeatureValueGetter to be used
by this EObjectStructuralFeatureValueCondition
to extract the value of the EStructuralFeature
of interest. It serves as a layer of indirection to allow
clients to intervene between this condition object and the way
it extracts the EStructuralFeature 's value so
as to allow for possible messaging of such value before
subjecting it to evaluation. -
resolve - A boolean flag to instruct this condition on whether or not it
should resolve a given value before evaluating it or not. This
flag will be passed to the eStructuralFeatureValueGetter since
it is the one responsible for getting EStructuralFeatures
values. -
valueCondition - The primary condition to be employed in checking the
EStructuralFeatures values -
policy - The ConditionPolicy to be used to determine how
to interpret the evaluation results as returned by the
valueCondition especially in the case of EStructuralFeatures
that hold collection of values.
isSatisfied
public boolean isSatisfied(
EObject eObject)
- Checks the value held by the initialization
EStructuralFeature to see if it satisfies this condition.
If the eObject passed for evaluation does not have the
EStructuralFeature in question the result of this
evaluation will be false .
-
-
Overrides:
-
isSatisfied
in class
EObjectStructuralFeatureCondition
-
-
Parameters:
-
eObject - the EObject to check
-
Returns:
- boolean
true if the argument eObject satisfies
this EObjectCondition
-
See Also:
-
EObjectCondition.isSatisfied(org.eclipse.emf.ecore.EObject)
getStructuralFeatureCondition
protected final
EObjectCondition getStructuralFeatureCondition()
- Accessor method for the the
EObjectCondition that is used
for actual testing of EStructuralFeature 's value in order
to determine if it satisfies this condition or not.
-
-
Returns:
- EObjectCondition the
EObjectCondition used to
evaluate the EStructuralFeature
isResolve
protected final boolean isResolve()
- Accessor method for the resolve argument used in initialization of this
condition
-
-
Returns:
- boolean the value resolve argument used in initialization of this
condition
getPolicy
public final
ConditionPolicy getPolicy()
- Accessor method for the policy argument used in initialization of this
condition
-
-
Returns:
- ConditionPolicy the policy used in evaluation
|
|
|