diff options
author | 2020-04-28 20:43:04 +0200 | |
---|---|---|
committer | 2020-04-28 20:43:04 +0200 | |
commit | 8a7b9b436b31e6d2f5a0521a077c960ebdeb4cbe (patch) | |
tree | d525bef75519f364d637e0779f8e63d4199dee31 /Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/RealObjectImpl.java | |
parent | check expressions are mapped to WF constraints (diff) | |
download | VIATRA-Generator-8a7b9b436b31e6d2f5a0521a077c960ebdeb4cbe.tar.gz VIATRA-Generator-8a7b9b436b31e6d2f5a0521a077c960ebdeb4cbe.tar.zst VIATRA-Generator-8a7b9b436b31e6d2f5a0521a077c960ebdeb4cbe.zip |
initial commit
Diffstat (limited to 'Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/RealObjectImpl.java')
-rw-r--r-- | Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/RealObjectImpl.java | 181 |
1 files changed, 181 insertions, 0 deletions
diff --git a/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/RealObjectImpl.java b/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/RealObjectImpl.java new file mode 100644 index 00000000..bc32a9a6 --- /dev/null +++ b/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/RealObjectImpl.java | |||
@@ -0,0 +1,181 @@ | |||
1 | /** | ||
2 | * generated by Xtext 2.18.0.M3 | ||
3 | */ | ||
4 | package org.eclipse.viatra.solver.language.solverLanguage.impl; | ||
5 | |||
6 | import java.math.BigDecimal; | ||
7 | |||
8 | import org.eclipse.emf.common.notify.Notification; | ||
9 | |||
10 | import org.eclipse.emf.ecore.EClass; | ||
11 | |||
12 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
13 | |||
14 | import org.eclipse.viatra.solver.language.solverLanguage.RealObject; | ||
15 | import org.eclipse.viatra.solver.language.solverLanguage.SolverLanguagePackage; | ||
16 | |||
17 | /** | ||
18 | * <!-- begin-user-doc --> | ||
19 | * An implementation of the model object '<em><b>Real Object</b></em>'. | ||
20 | * <!-- end-user-doc --> | ||
21 | * <p> | ||
22 | * The following features are implemented: | ||
23 | * </p> | ||
24 | * <ul> | ||
25 | * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.RealObjectImpl#getValue <em>Value</em>}</li> | ||
26 | * </ul> | ||
27 | * | ||
28 | * @generated | ||
29 | */ | ||
30 | public class RealObjectImpl extends DataObjectImpl implements RealObject | ||
31 | { | ||
32 | /** | ||
33 | * The default value of the '{@link #getValue() <em>Value</em>}' attribute. | ||
34 | * <!-- begin-user-doc --> | ||
35 | * <!-- end-user-doc --> | ||
36 | * @see #getValue() | ||
37 | * @generated | ||
38 | * @ordered | ||
39 | */ | ||
40 | protected static final BigDecimal VALUE_EDEFAULT = null; | ||
41 | |||
42 | /** | ||
43 | * The cached value of the '{@link #getValue() <em>Value</em>}' attribute. | ||
44 | * <!-- begin-user-doc --> | ||
45 | * <!-- end-user-doc --> | ||
46 | * @see #getValue() | ||
47 | * @generated | ||
48 | * @ordered | ||
49 | */ | ||
50 | protected BigDecimal value = VALUE_EDEFAULT; | ||
51 | |||
52 | /** | ||
53 | * <!-- begin-user-doc --> | ||
54 | * <!-- end-user-doc --> | ||
55 | * @generated | ||
56 | */ | ||
57 | protected RealObjectImpl() | ||
58 | { | ||
59 | super(); | ||
60 | } | ||
61 | |||
62 | /** | ||
63 | * <!-- begin-user-doc --> | ||
64 | * <!-- end-user-doc --> | ||
65 | * @generated | ||
66 | */ | ||
67 | @Override | ||
68 | protected EClass eStaticClass() | ||
69 | { | ||
70 | return SolverLanguagePackage.Literals.REAL_OBJECT; | ||
71 | } | ||
72 | |||
73 | /** | ||
74 | * <!-- begin-user-doc --> | ||
75 | * <!-- end-user-doc --> | ||
76 | * @generated | ||
77 | */ | ||
78 | @Override | ||
79 | public BigDecimal getValue() | ||
80 | { | ||
81 | return value; | ||
82 | } | ||
83 | |||
84 | /** | ||
85 | * <!-- begin-user-doc --> | ||
86 | * <!-- end-user-doc --> | ||
87 | * @generated | ||
88 | */ | ||
89 | @Override | ||
90 | public void setValue(BigDecimal newValue) | ||
91 | { | ||
92 | BigDecimal oldValue = value; | ||
93 | value = newValue; | ||
94 | if (eNotificationRequired()) | ||
95 | eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.REAL_OBJECT__VALUE, oldValue, value)); | ||
96 | } | ||
97 | |||
98 | /** | ||
99 | * <!-- begin-user-doc --> | ||
100 | * <!-- end-user-doc --> | ||
101 | * @generated | ||
102 | */ | ||
103 | @Override | ||
104 | public Object eGet(int featureID, boolean resolve, boolean coreType) | ||
105 | { | ||
106 | switch (featureID) | ||
107 | { | ||
108 | case SolverLanguagePackage.REAL_OBJECT__VALUE: | ||
109 | return getValue(); | ||
110 | } | ||
111 | return super.eGet(featureID, resolve, coreType); | ||
112 | } | ||
113 | |||
114 | /** | ||
115 | * <!-- begin-user-doc --> | ||
116 | * <!-- end-user-doc --> | ||
117 | * @generated | ||
118 | */ | ||
119 | @Override | ||
120 | public void eSet(int featureID, Object newValue) | ||
121 | { | ||
122 | switch (featureID) | ||
123 | { | ||
124 | case SolverLanguagePackage.REAL_OBJECT__VALUE: | ||
125 | setValue((BigDecimal)newValue); | ||
126 | return; | ||
127 | } | ||
128 | super.eSet(featureID, newValue); | ||
129 | } | ||
130 | |||
131 | /** | ||
132 | * <!-- begin-user-doc --> | ||
133 | * <!-- end-user-doc --> | ||
134 | * @generated | ||
135 | */ | ||
136 | @Override | ||
137 | public void eUnset(int featureID) | ||
138 | { | ||
139 | switch (featureID) | ||
140 | { | ||
141 | case SolverLanguagePackage.REAL_OBJECT__VALUE: | ||
142 | setValue(VALUE_EDEFAULT); | ||
143 | return; | ||
144 | } | ||
145 | super.eUnset(featureID); | ||
146 | } | ||
147 | |||
148 | /** | ||
149 | * <!-- begin-user-doc --> | ||
150 | * <!-- end-user-doc --> | ||
151 | * @generated | ||
152 | */ | ||
153 | @Override | ||
154 | public boolean eIsSet(int featureID) | ||
155 | { | ||
156 | switch (featureID) | ||
157 | { | ||
158 | case SolverLanguagePackage.REAL_OBJECT__VALUE: | ||
159 | return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); | ||
160 | } | ||
161 | return super.eIsSet(featureID); | ||
162 | } | ||
163 | |||
164 | /** | ||
165 | * <!-- begin-user-doc --> | ||
166 | * <!-- end-user-doc --> | ||
167 | * @generated | ||
168 | */ | ||
169 | @Override | ||
170 | public String toString() | ||
171 | { | ||
172 | if (eIsProxy()) return super.toString(); | ||
173 | |||
174 | StringBuilder result = new StringBuilder(super.toString()); | ||
175 | result.append(" (value: "); | ||
176 | result.append(value); | ||
177 | result.append(')'); | ||
178 | return result.toString(); | ||
179 | } | ||
180 | |||
181 | } //RealObjectImpl | ||