Class IterateConditionService
- java.lang.Object
-
- org.eclipse.emf.ecp.view.internal.rule.IterateConditionService
-
- All Implemented Interfaces:
ConditionService<IterateCondition>
public class IterateConditionService extends java.lang.ObjectCondition service for theIterateCondition.- Author:
- Christian W. Damus
-
-
Constructor Summary
Constructors Constructor Description IterateConditionService()Initializes me.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Iterable<? extends Condition>components(IterateCondition condition)Obtains the nested conditions in a compositeconditionof my type.booleanevaluate(C condition, org.eclipse.emf.ecore.EObject domainModel)Evaluates the given condition.booleanevaluateChangedValues(C condition, org.eclipse.emf.ecore.EObject domainModel, java.util.Map<org.eclipse.emf.ecore.EStructuralFeature.Setting,java.lang.Object> possibleNewValues)Evaluates the given condition.java.util.Set<UniqueSetting>getConditionSettings(IterateCondition condition, org.eclipse.emf.ecore.EObject domainModel)The set ofUniqueSettingthat are relevant for the provided condition and domain model.org.eclipse.emf.ecore.EClassgetConditionType()The EClass this ConditionService is implemented for.java.util.Set<VDomainModelReference>getDomainModelReferences(IterateCondition condition)The Set ofVDomainModelReferencethat are relevant for the condition.protected java.util.List<? extends org.eclipse.emf.ecore.EObject>getTargets(IterateCondition condition, org.eclipse.emf.ecore.EObject domainModel)Obtains the objects on which aconditionis evaluated.
-
-
-
Method Detail
-
getConditionType
public org.eclipse.emf.ecore.EClass getConditionType()
Description copied from interface:ConditionServiceThe EClass this ConditionService is implemented for.- Returns:
- The EClass of the
Condition
-
getTargets
protected java.util.List<? extends org.eclipse.emf.ecore.EObject> getTargets(IterateCondition condition, org.eclipse.emf.ecore.EObject domainModel)
Obtains the objects on which aconditionis evaluated.- Parameters:
condition- a composite condition of my typedomainModel- the source from which to navigate to obtain the targets for evaluation of thecondition- Returns:
- the evaluation targets
-
components
protected java.lang.Iterable<? extends Condition> components(IterateCondition condition)
Obtains the nested conditions in a compositeconditionof my type.- Parameters:
condition- the composite condition from which to get components- Returns:
- the
condition's zero or more nested conditions that are its components
-
getDomainModelReferences
public java.util.Set<VDomainModelReference> getDomainModelReferences(IterateCondition condition)
Description copied from interface:ConditionServiceThe Set ofVDomainModelReferencethat are relevant for the condition.- Specified by:
getDomainModelReferencesin interfaceConditionService<IterateCondition>- Parameters:
condition- TheConditionto retrieve the VDMRs for- Returns:
- The Set of VDomainModelReferences. This Set must not be null.
-
getConditionSettings
public java.util.Set<UniqueSetting> getConditionSettings(IterateCondition condition, org.eclipse.emf.ecore.EObject domainModel)
Description copied from interface:ConditionServiceThe set ofUniqueSettingthat are relevant for the provided condition and domain model.- Specified by:
getConditionSettingsin interfaceConditionService<IterateCondition>- Parameters:
condition- TheConditionto get the UniqueSettings fordomainModel- TheEObjectto use for retrieving- Returns:
- The Set of UniqueSettings. This Set must not be null.
-
evaluate
public boolean evaluate(C condition, org.eclipse.emf.ecore.EObject domainModel)Description copied from interface:ConditionServiceEvaluates the given condition.- Specified by:
evaluatein interfaceConditionService<C extends Condition>- Parameters:
condition- The Condition to evaluatedomainModel- The root domain object of this condition.- Returns:
true, if the condition matches,falseotherwise
-
evaluateChangedValues
public boolean evaluateChangedValues(C condition, org.eclipse.emf.ecore.EObject domainModel, java.util.Map<org.eclipse.emf.ecore.EStructuralFeature.Setting,java.lang.Object> possibleNewValues)Description copied from interface:ConditionServiceEvaluates the given condition.- Specified by:
evaluateChangedValuesin interfaceConditionService<C extends Condition>- Parameters:
condition- The Condition to evaluatedomainModel- The root domain object of this condition.possibleNewValues- the new value that should be compared against the expected value of the condition- Returns:
true, if the condition matches,falseotherwise
-
-