|
IBM Rational Software Modeler Release 6.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.xtools.emf.query.conditions.Condition
com.ibm.xtools.emf.query.conditions.eobjects.EObjectCondition
com.ibm.xtools.emf.query.conditions.eobjects.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 com.ibm.xtools.emf.query.conditions.eobjects.EObjectCondition |
E_FALSE, E_TRUE |
Fields inherited from class com.ibm.xtools.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(org.eclipse.emf.ecore.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(org.eclipse.emf.ecore.EObject eObject)
The implementation of this function simply forwards the actual evaluation to the wrapped EObjectCondition . |
Methods inherited from class com.ibm.xtools.emf.query.conditions.eobjects.EObjectCondition |
AND, EQUIVALENT, getPruneHandler, IMPLIES, OR, XOR |
Methods inherited from class com.ibm.xtools.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 EObjectCondition
Condition.isSatisfied(java.lang.Object)
public boolean isSatisfied(org.eclipse.emf.ecore.EObject eObject)
EObjectCondition
.
isSatisfied
in class EObjectCondition
eObject
- the EObject
to check
true
if the argument eObject satisfies
this EObjectCondition
EObjectCondition.isSatisfied(org.eclipse.emf.ecore.EObject)
public boolean shouldPrune(org.eclipse.emf.ecore.EObject eObject)
EObjectCondition
.
shouldPrune
in class EObjectCondition
eObject
- 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
|
IBM Rational Software Modeler Release 6.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2004. All rights reserved.