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