|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.emf.query.conditions.Condition
org.eclipse.emf.query.conditions.eobjects.EObjectCondition
org.eclipse.emf.query.conditions.eobjects.EObjectConditionDelegator
public class EObjectConditionDelegator
A utility EObjectCondition class to act as a place holder for
another EObjectCondition condition object where all the calls
to it is simply forwarded to the wrapped EObjectCondition.
Helps if when clients need an EObjectCondition to hold onto at
a time when the actual EObjectCondition cannot be constructed
for some reason or another, this way, a
EObjectConditionDelegator can be returned while the delegated
to EObjectCondition could be constructed later when more info
is available. One other use is that when the client will hold on to an
EObjectCondition while the requirements dictate that the
EObjectCondition to use for evaluation could change over time,
if the supplier of the EObjectCondition has no way of
informing the clients of the change in the implementation of the
EObjectCondition, it can pass on this
EObjectConditionDelegator as wrapper for the
EObjectCondition to use at the time of the request, and later
on, the supplier can change the EObjectCondition to use at a
later time and all the clients out there will be getting the latest version
of the EObjectCondition to use for evaluation.
Please note that it is the responsibility of the supplier of this
EObjectConditionDelegator to ensure that it is properly
initialized with the real EObjectCondition before the
EObjectConditionDelegator is being used for evaluation by
clients since this EObjectConditionDelegator will simply
forward the evaluation call to the wrapped EObjectCondition.
| Field Summary |
|---|
| Fields inherited from class org.eclipse.emf.query.conditions.eobjects.EObjectCondition |
|---|
E_FALSE, E_TRUE |
| Fields inherited from class org.eclipse.emf.query.conditions.Condition |
|---|
FALSE, TRUE |
| Constructor Summary | |
|---|---|
EObjectConditionDelegator()
A simple constructor, initlaizes the wrapped EObjectCondition to null. |
|
EObjectConditionDelegator(EObjectCondition eObjectCondition)
A constructor that uses the argument EObjectCondition as
its wrapped EObjectCondition. |
|
| Method Summary | |
|---|---|
boolean |
isSatisfied(EObject eObject)
The implementation of this function simply forwards the actual evaluation to the wrapped EObjectCondition. |
boolean |
isSatisfied(Object object)
Overrides the parent's implementation by simply forwarding the actual evaluation to the wrapped EObjectCondition. |
void |
setEObjectCondition(EObjectCondition eObjectCondition)
Sets the wrapped EObjectCondition used by this
EObjectConditionDelegator. |
boolean |
shouldPrune(EObject eObject)
The implementation of this function simply forwards the actual evaluation to the wrapped EObjectCondition. |
| Methods inherited from class org.eclipse.emf.query.conditions.eobjects.EObjectCondition |
|---|
AND, EQUIVALENT, getPruneHandler, IMPLIES, OR, XOR |
| Methods inherited from class org.eclipse.emf.query.conditions.Condition |
|---|
AND, EQUIVALENT, IMPLIES, OR, XOR |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EObjectConditionDelegator()
EObjectCondition to null. The supplier of
this EObjectConditionDelegator must ensure that a valid
EObjectCondition is passed to this
EObjectConditionDelegator before any calls for evaluation
are made on it.
public EObjectConditionDelegator(EObjectCondition eObjectCondition)
EObjectCondition as
its wrapped EObjectCondition.
eObjectCondition - the delegated-to EObjectCondition where all
calls made on this EObjectConditionDelegator
will be forwarded to.| Method Detail |
|---|
public boolean isSatisfied(Object object)
EObjectCondition.
isSatisfied in class EObjectConditionobject - an Object to check if it satisfies this Condition
true if the argument Object satisfies this
Condition,false otherwise.Condition.isSatisfied(java.lang.Object)public boolean isSatisfied(EObject eObject)
EObjectCondition.
isSatisfied in class EObjectConditioneObject - the EObject to check
true if the argument eObject satisfies
this EObjectConditionEObjectCondition.isSatisfied(org.eclipse.emf.ecore.EObject)public boolean shouldPrune(EObject eObject)
EObjectCondition.
shouldPrune in class EObjectConditioneObject - the EObject to check to see whether to visit its children or not
true if we should prune and false otherwiseEObjectCondition.shouldPrune(org.eclipse.emf.ecore.EObject)public void setEObjectCondition(EObjectCondition eObjectCondition)
EObjectCondition used by this
EObjectConditionDelegator. Could be completely different
than the original one passed when constructing.
eObjectCondition - the EObjectCondition to forward calls to by
this EObjectConditionDelegator
|
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 | |||||||||