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