## org.eclipse.emf.query.conditions.eobjects
Class EObjectConditionDelegator

    java.lang.Object
      org.eclipse.emf.query.conditions.Condition
          org.eclipse.emf.query.conditions.eobjects.EObjectCondition
              org.eclipse.emf.query.conditions.eobjects.EObjectConditionDelegator

    public class EObjectConditionDelegator

extends EObjectCondition

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, initializes 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

### EObjectConditionDelegator

    public EObjectConditionDelegator()

  A simple constructor, initializes the wrapped `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.

### EObjectConditionDelegator

    public EObjectConditionDelegator(EObjectCondition eObjectCondition)

  A constructor that uses the argument `EObjectCondition` as its wrapped `EObjectCondition`.

  Parameters:
    `eObjectCondition` - the delegated-to `EObjectCondition` where all calls made on this `EObjectConditionDelegator` will be forwarded to.

Method Detail

### isSatisfied

    public boolean isSatisfied(Object object)

  Overrides the parent's implementation by simply forwarding the actual evaluation to the wrapped `EObjectCondition`.

  Overrides:
    `isSatisfied` in class `EObjectCondition`
  Parameters:
    `object` - an Object to check if it satisfies this `Condition`
  Returns:
    `true` if the argument Object satisfies this `Condition`,`false` otherwise.
  See Also:
    `Condition.isSatisfied(java.lang.Object)`

### isSatisfied

    public boolean isSatisfied(EObject eObject)

  The implementation of this function simply forwards the actual evaluation to the wrapped `EObjectCondition`.

  Specified by:
    `isSatisfied` in class `EObjectCondition`
  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)`

### shouldPrune

    public boolean shouldPrune(EObject eObject)

  The implementation of this function simply forwards the actual evaluation to the wrapped `EObjectCondition`.

  Overrides:
    `shouldPrune` in class `EObjectCondition`
  Parameters:
    `eObject` - the `EObject` to check to see whether to visit its children or not
  Returns:
    boolean `true` if we should prune and `false` otherwise
  See Also:
    `EObjectCondition.shouldPrune(org.eclipse.emf.ecore.EObject)`

### setEObjectCondition

    public void setEObjectCondition(EObjectCondition eObjectCondition)

  Sets the wrapped `EObjectCondition` used by this `EObjectConditionDelegator`. Could be completely different than the original one passed when constructing.

  Parameters:
    `eObjectCondition` - the `EObjectCondition` to forward calls to by this `EObjectConditionDelegator`

Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved.