aboutsummaryrefslogtreecommitdiffstats
path: root/Application/org.eclipse.viatra.solver.language.model/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/AggregateExpressionImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'Application/org.eclipse.viatra.solver.language.model/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/AggregateExpressionImpl.java')
-rw-r--r--Application/org.eclipse.viatra.solver.language.model/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/AggregateExpressionImpl.java228
1 files changed, 228 insertions, 0 deletions
diff --git a/Application/org.eclipse.viatra.solver.language.model/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/AggregateExpressionImpl.java b/Application/org.eclipse.viatra.solver.language.model/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/AggregateExpressionImpl.java
new file mode 100644
index 00000000..9427a84d
--- /dev/null
+++ b/Application/org.eclipse.viatra.solver.language.model/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/AggregateExpressionImpl.java
@@ -0,0 +1,228 @@
1/**
2 */
3package org.eclipse.viatra.solver.language.solverLanguage.impl;
4
5import java.util.Collection;
6
7import org.eclipse.emf.common.notify.Notification;
8import org.eclipse.emf.common.notify.NotificationChain;
9
10import org.eclipse.emf.common.util.EList;
11
12import org.eclipse.emf.ecore.EClass;
13import org.eclipse.emf.ecore.InternalEObject;
14
15import org.eclipse.emf.ecore.impl.ENotificationImpl;
16
17import org.eclipse.emf.ecore.util.EObjectContainmentEList;
18import org.eclipse.emf.ecore.util.InternalEList;
19
20import org.eclipse.viatra.solver.language.solverLanguage.AggregateExpression;
21import org.eclipse.viatra.solver.language.solverLanguage.Expression;
22import org.eclipse.viatra.solver.language.solverLanguage.SolverLanguagePackage;
23import org.eclipse.viatra.solver.language.solverLanguage.Variable;
24
25/**
26 * <!-- begin-user-doc -->
27 * An implementation of the model object '<em><b>Aggregate Expression</b></em>'.
28 * <!-- end-user-doc -->
29 * <p>
30 * The following features are implemented:
31 * </p>
32 * <ul>
33 * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.AggregateExpressionImpl#getForallVariables <em>Forall Variables</em>}</li>
34 * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.AggregateExpressionImpl#getCondition <em>Condition</em>}</li>
35 * </ul>
36 *
37 * @generated
38 */
39public abstract class AggregateExpressionImpl extends ExpressionImpl implements AggregateExpression {
40 /**
41 * The cached value of the '{@link #getForallVariables() <em>Forall Variables</em>}' containment reference list.
42 * <!-- begin-user-doc -->
43 * <!-- end-user-doc -->
44 * @see #getForallVariables()
45 * @generated
46 * @ordered
47 */
48 protected EList<Variable> forallVariables;
49
50 /**
51 * The cached value of the '{@link #getCondition() <em>Condition</em>}' containment reference.
52 * <!-- begin-user-doc -->
53 * <!-- end-user-doc -->
54 * @see #getCondition()
55 * @generated
56 * @ordered
57 */
58 protected Expression condition;
59
60 /**
61 * <!-- begin-user-doc -->
62 * <!-- end-user-doc -->
63 * @generated
64 */
65 protected AggregateExpressionImpl() {
66 super();
67 }
68
69 /**
70 * <!-- begin-user-doc -->
71 * <!-- end-user-doc -->
72 * @generated
73 */
74 @Override
75 protected EClass eStaticClass() {
76 return SolverLanguagePackage.Literals.AGGREGATE_EXPRESSION;
77 }
78
79 /**
80 * <!-- begin-user-doc -->
81 * <!-- end-user-doc -->
82 * @generated
83 */
84 public EList<Variable> getForallVariables() {
85 if (forallVariables == null) {
86 forallVariables = new EObjectContainmentEList<Variable>(Variable.class, this,
87 SolverLanguagePackage.AGGREGATE_EXPRESSION__FORALL_VARIABLES);
88 }
89 return forallVariables;
90 }
91
92 /**
93 * <!-- begin-user-doc -->
94 * <!-- end-user-doc -->
95 * @generated
96 */
97 public Expression getCondition() {
98 return condition;
99 }
100
101 /**
102 * <!-- begin-user-doc -->
103 * <!-- end-user-doc -->
104 * @generated
105 */
106 public NotificationChain basicSetCondition(Expression newCondition, NotificationChain msgs) {
107 Expression oldCondition = condition;
108 condition = newCondition;
109 if (eNotificationRequired()) {
110 ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
111 SolverLanguagePackage.AGGREGATE_EXPRESSION__CONDITION, oldCondition, newCondition);
112 if (msgs == null)
113 msgs = notification;
114 else
115 msgs.add(notification);
116 }
117 return msgs;
118 }
119
120 /**
121 * <!-- begin-user-doc -->
122 * <!-- end-user-doc -->
123 * @generated
124 */
125 public void setCondition(Expression newCondition) {
126 if (newCondition != condition) {
127 NotificationChain msgs = null;
128 if (condition != null)
129 msgs = ((InternalEObject) condition).eInverseRemove(this,
130 EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.AGGREGATE_EXPRESSION__CONDITION, null, msgs);
131 if (newCondition != null)
132 msgs = ((InternalEObject) newCondition).eInverseAdd(this,
133 EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.AGGREGATE_EXPRESSION__CONDITION, null, msgs);
134 msgs = basicSetCondition(newCondition, msgs);
135 if (msgs != null)
136 msgs.dispatch();
137 } else if (eNotificationRequired())
138 eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.AGGREGATE_EXPRESSION__CONDITION,
139 newCondition, newCondition));
140 }
141
142 /**
143 * <!-- begin-user-doc -->
144 * <!-- end-user-doc -->
145 * @generated
146 */
147 @Override
148 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
149 switch (featureID) {
150 case SolverLanguagePackage.AGGREGATE_EXPRESSION__FORALL_VARIABLES:
151 return ((InternalEList<?>) getForallVariables()).basicRemove(otherEnd, msgs);
152 case SolverLanguagePackage.AGGREGATE_EXPRESSION__CONDITION:
153 return basicSetCondition(null, msgs);
154 }
155 return super.eInverseRemove(otherEnd, featureID, msgs);
156 }
157
158 /**
159 * <!-- begin-user-doc -->
160 * <!-- end-user-doc -->
161 * @generated
162 */
163 @Override
164 public Object eGet(int featureID, boolean resolve, boolean coreType) {
165 switch (featureID) {
166 case SolverLanguagePackage.AGGREGATE_EXPRESSION__FORALL_VARIABLES:
167 return getForallVariables();
168 case SolverLanguagePackage.AGGREGATE_EXPRESSION__CONDITION:
169 return getCondition();
170 }
171 return super.eGet(featureID, resolve, coreType);
172 }
173
174 /**
175 * <!-- begin-user-doc -->
176 * <!-- end-user-doc -->
177 * @generated
178 */
179 @SuppressWarnings("unchecked")
180 @Override
181 public void eSet(int featureID, Object newValue) {
182 switch (featureID) {
183 case SolverLanguagePackage.AGGREGATE_EXPRESSION__FORALL_VARIABLES:
184 getForallVariables().clear();
185 getForallVariables().addAll((Collection<? extends Variable>) newValue);
186 return;
187 case SolverLanguagePackage.AGGREGATE_EXPRESSION__CONDITION:
188 setCondition((Expression) newValue);
189 return;
190 }
191 super.eSet(featureID, newValue);
192 }
193
194 /**
195 * <!-- begin-user-doc -->
196 * <!-- end-user-doc -->
197 * @generated
198 */
199 @Override
200 public void eUnset(int featureID) {
201 switch (featureID) {
202 case SolverLanguagePackage.AGGREGATE_EXPRESSION__FORALL_VARIABLES:
203 getForallVariables().clear();
204 return;
205 case SolverLanguagePackage.AGGREGATE_EXPRESSION__CONDITION:
206 setCondition((Expression) null);
207 return;
208 }
209 super.eUnset(featureID);
210 }
211
212 /**
213 * <!-- begin-user-doc -->
214 * <!-- end-user-doc -->
215 * @generated
216 */
217 @Override
218 public boolean eIsSet(int featureID) {
219 switch (featureID) {
220 case SolverLanguagePackage.AGGREGATE_EXPRESSION__FORALL_VARIABLES:
221 return forallVariables != null && !forallVariables.isEmpty();
222 case SolverLanguagePackage.AGGREGATE_EXPRESSION__CONDITION:
223 return condition != null;
224 }
225 return super.eIsSet(featureID);
226 }
227
228} //AggregateExpressionImpl