Skip to content

Package: Condition

Condition

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2016 EclipseSource Muenchen GmbH and others.
3: *
4: * All rights reserved. This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License 2.0
6: * which accompanies this distribution, and is available at
7: * https://www.eclipse.org/legal/epl-2.0/
8: *
9: * SPDX-License-Identifier: EPL-2.0
10: *
11: * Contributors:
12: * EclipseSource Munich GmbH - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emf.ecp.view.spi.rule.model;
15:
16: import java.util.Map;
17:
18: import org.eclipse.emf.ecore.EObject;
19: import org.eclipse.emf.ecore.EStructuralFeature.Setting;
20:
21: /**
22: * <!-- begin-user-doc -->
23: * A representation of the model object '<em><b>Condition</b></em>'.
24: *
25: * @since 1.2
26: * <!-- end-user-doc -->
27: *
28: *
29: * @see org.eclipse.emf.ecp.view.spi.rule.model.RulePackage#getCondition()
30: * @model abstract="true"
31: * @generated
32: */
33: public interface Condition extends EObject {
34:
35:         /**
36:          * Evaluates the given condition.
37:          *
38:          * @param domainModel The root domain object of this condition.
39:          * @return {@code true}, if the condition matches, {@code false} otherwise
40:          * @since 1.9
41:          */
42:         boolean evaluate(EObject domainModel);
43:
44:         /**
45:          * Evaluates the given condition.
46:          *
47:          * @param domainModel The root domain object of this condition.
48:          * @param possibleNewValues
49:          * the new value that should be compared against the expected value of the condition
50:          * @return {@code true}, if the condition matches, {@code false} otherwise
51:          * @since 1.9
52:          */
53:         boolean evaluateChangedValues(EObject domainModel, Map<Setting, Object> possibleNewValues);
54: } // Condition