diff options
author | 2021-06-25 17:12:45 +0200 | |
---|---|---|
committer | 2021-06-25 17:12:45 +0200 | |
commit | baba88758a0ea5f671ab4a2aeacec374bed938c4 (patch) | |
tree | 1be30230a0959ce8d22986d91b1ed2460a328148 /org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ProblemImpl.java | |
parent | Initial commit (diff) | |
download | refinery-baba88758a0ea5f671ab4a2aeacec374bed938c4.tar.gz refinery-baba88758a0ea5f671ab4a2aeacec374bed938c4.tar.zst refinery-baba88758a0ea5f671ab4a2aeacec374bed938c4.zip |
Add initial prototype
Diffstat (limited to 'org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ProblemImpl.java')
-rw-r--r-- | org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ProblemImpl.java | 189 |
1 files changed, 189 insertions, 0 deletions
diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ProblemImpl.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ProblemImpl.java new file mode 100644 index 00000000..32bba265 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ProblemImpl.java | |||
@@ -0,0 +1,189 @@ | |||
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.NotificationChain; | ||
8 | |||
9 | import org.eclipse.emf.common.util.EList; | ||
10 | |||
11 | import org.eclipse.emf.ecore.EClass; | ||
12 | import org.eclipse.emf.ecore.InternalEObject; | ||
13 | |||
14 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
15 | |||
16 | import org.eclipse.emf.ecore.util.EObjectContainmentEList; | ||
17 | import org.eclipse.emf.ecore.util.InternalEList; | ||
18 | |||
19 | import org.eclipse.viatra.solver.language.model.problem.Node; | ||
20 | import org.eclipse.viatra.solver.language.model.problem.Problem; | ||
21 | import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; | ||
22 | import org.eclipse.viatra.solver.language.model.problem.Statement; | ||
23 | |||
24 | /** | ||
25 | * <!-- begin-user-doc --> | ||
26 | * An implementation of the model object '<em><b>Problem</b></em>'. | ||
27 | * <!-- end-user-doc --> | ||
28 | * <p> | ||
29 | * The following features are implemented: | ||
30 | * </p> | ||
31 | * <ul> | ||
32 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.ProblemImpl#getNodes <em>Nodes</em>}</li> | ||
33 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.ProblemImpl#getStatements <em>Statements</em>}</li> | ||
34 | * </ul> | ||
35 | * | ||
36 | * @generated | ||
37 | */ | ||
38 | public class ProblemImpl extends MinimalEObjectImpl.Container implements Problem { | ||
39 | /** | ||
40 | * The cached value of the '{@link #getNodes() <em>Nodes</em>}' containment reference list. | ||
41 | * <!-- begin-user-doc --> | ||
42 | * <!-- end-user-doc --> | ||
43 | * @see #getNodes() | ||
44 | * @generated | ||
45 | * @ordered | ||
46 | */ | ||
47 | protected EList<Node> nodes; | ||
48 | /** | ||
49 | * The cached value of the '{@link #getStatements() <em>Statements</em>}' containment reference list. | ||
50 | * <!-- begin-user-doc --> | ||
51 | * <!-- end-user-doc --> | ||
52 | * @see #getStatements() | ||
53 | * @generated | ||
54 | * @ordered | ||
55 | */ | ||
56 | protected EList<Statement> statements; | ||
57 | |||
58 | /** | ||
59 | * <!-- begin-user-doc --> | ||
60 | * <!-- end-user-doc --> | ||
61 | * @generated | ||
62 | */ | ||
63 | protected ProblemImpl() { | ||
64 | super(); | ||
65 | } | ||
66 | |||
67 | /** | ||
68 | * <!-- begin-user-doc --> | ||
69 | * <!-- end-user-doc --> | ||
70 | * @generated | ||
71 | */ | ||
72 | @Override | ||
73 | protected EClass eStaticClass() { | ||
74 | return ProblemPackage.Literals.PROBLEM; | ||
75 | } | ||
76 | |||
77 | /** | ||
78 | * <!-- begin-user-doc --> | ||
79 | * <!-- end-user-doc --> | ||
80 | * @generated | ||
81 | */ | ||
82 | public EList<Node> getNodes() { | ||
83 | if (nodes == null) { | ||
84 | nodes = new EObjectContainmentEList<Node>(Node.class, this, ProblemPackage.PROBLEM__NODES); | ||
85 | } | ||
86 | return nodes; | ||
87 | } | ||
88 | |||
89 | /** | ||
90 | * <!-- begin-user-doc --> | ||
91 | * <!-- end-user-doc --> | ||
92 | * @generated | ||
93 | */ | ||
94 | public EList<Statement> getStatements() { | ||
95 | if (statements == null) { | ||
96 | statements = new EObjectContainmentEList<Statement>(Statement.class, this, | ||
97 | ProblemPackage.PROBLEM__STATEMENTS); | ||
98 | } | ||
99 | return statements; | ||
100 | } | ||
101 | |||
102 | /** | ||
103 | * <!-- begin-user-doc --> | ||
104 | * <!-- end-user-doc --> | ||
105 | * @generated | ||
106 | */ | ||
107 | @Override | ||
108 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
109 | switch (featureID) { | ||
110 | case ProblemPackage.PROBLEM__NODES: | ||
111 | return ((InternalEList<?>) getNodes()).basicRemove(otherEnd, msgs); | ||
112 | case ProblemPackage.PROBLEM__STATEMENTS: | ||
113 | return ((InternalEList<?>) getStatements()).basicRemove(otherEnd, msgs); | ||
114 | } | ||
115 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
116 | } | ||
117 | |||
118 | /** | ||
119 | * <!-- begin-user-doc --> | ||
120 | * <!-- end-user-doc --> | ||
121 | * @generated | ||
122 | */ | ||
123 | @Override | ||
124 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
125 | switch (featureID) { | ||
126 | case ProblemPackage.PROBLEM__NODES: | ||
127 | return getNodes(); | ||
128 | case ProblemPackage.PROBLEM__STATEMENTS: | ||
129 | return getStatements(); | ||
130 | } | ||
131 | return super.eGet(featureID, resolve, coreType); | ||
132 | } | ||
133 | |||
134 | /** | ||
135 | * <!-- begin-user-doc --> | ||
136 | * <!-- end-user-doc --> | ||
137 | * @generated | ||
138 | */ | ||
139 | @SuppressWarnings("unchecked") | ||
140 | @Override | ||
141 | public void eSet(int featureID, Object newValue) { | ||
142 | switch (featureID) { | ||
143 | case ProblemPackage.PROBLEM__NODES: | ||
144 | getNodes().clear(); | ||
145 | getNodes().addAll((Collection<? extends Node>) newValue); | ||
146 | return; | ||
147 | case ProblemPackage.PROBLEM__STATEMENTS: | ||
148 | getStatements().clear(); | ||
149 | getStatements().addAll((Collection<? extends Statement>) newValue); | ||
150 | return; | ||
151 | } | ||
152 | super.eSet(featureID, newValue); | ||
153 | } | ||
154 | |||
155 | /** | ||
156 | * <!-- begin-user-doc --> | ||
157 | * <!-- end-user-doc --> | ||
158 | * @generated | ||
159 | */ | ||
160 | @Override | ||
161 | public void eUnset(int featureID) { | ||
162 | switch (featureID) { | ||
163 | case ProblemPackage.PROBLEM__NODES: | ||
164 | getNodes().clear(); | ||
165 | return; | ||
166 | case ProblemPackage.PROBLEM__STATEMENTS: | ||
167 | getStatements().clear(); | ||
168 | return; | ||
169 | } | ||
170 | super.eUnset(featureID); | ||
171 | } | ||
172 | |||
173 | /** | ||
174 | * <!-- begin-user-doc --> | ||
175 | * <!-- end-user-doc --> | ||
176 | * @generated | ||
177 | */ | ||
178 | @Override | ||
179 | public boolean eIsSet(int featureID) { | ||
180 | switch (featureID) { | ||
181 | case ProblemPackage.PROBLEM__NODES: | ||
182 | return nodes != null && !nodes.isEmpty(); | ||
183 | case ProblemPackage.PROBLEM__STATEMENTS: | ||
184 | return statements != null && !statements.isEmpty(); | ||
185 | } | ||
186 | return super.eIsSet(featureID); | ||
187 | } | ||
188 | |||
189 | } //ProblemImpl | ||