1 | /** |
2 | * <copyright> |
3 | * </copyright> |
4 | * |
5 | * $Id$ |
6 | */ |
7 | package LqnCore.impl; |
8 | |
9 | import LqnCore.LqnCorePackage; |
10 | import LqnCore.OutputEntryDistributionType; |
11 | |
12 | import java.math.BigInteger; |
13 | |
14 | import org.eclipse.emf.common.notify.Notification; |
15 | |
16 | import org.eclipse.emf.ecore.EClass; |
17 | |
18 | import org.eclipse.emf.ecore.impl.ENotificationImpl; |
19 | |
20 | /** |
21 | * <!-- begin-user-doc --> |
22 | * An implementation of the model object '<em><b>Output Entry Distribution Type</b></em>'. |
23 | * <!-- end-user-doc --> |
24 | * <p> |
25 | * The following features are implemented: |
26 | * <ul> |
27 | * <li>{@link LqnCore.impl.OutputEntryDistributionTypeImpl#getPhase <em>Phase</em>}</li> |
28 | * </ul> |
29 | * </p> |
30 | * |
31 | * @generated |
32 | */ |
33 | public class OutputEntryDistributionTypeImpl extends OutputDistributionTypeImpl implements OutputEntryDistributionType { |
34 | /** |
35 | * The default value of the '{@link #getPhase() <em>Phase</em>}' attribute. |
36 | * <!-- begin-user-doc --> |
37 | * <!-- end-user-doc --> |
38 | * @see #getPhase() |
39 | * @generated |
40 | * @ordered |
41 | */ |
42 | protected static final BigInteger PHASE_EDEFAULT = null; |
43 | |
44 | /** |
45 | * The cached value of the '{@link #getPhase() <em>Phase</em>}' attribute. |
46 | * <!-- begin-user-doc --> |
47 | * <!-- end-user-doc --> |
48 | * @see #getPhase() |
49 | * @generated |
50 | * @ordered |
51 | */ |
52 | protected BigInteger phase = PHASE_EDEFAULT; |
53 | |
54 | /** |
55 | * <!-- begin-user-doc --> |
56 | * <!-- end-user-doc --> |
57 | * @generated |
58 | */ |
59 | protected OutputEntryDistributionTypeImpl() { |
60 | super(); |
61 | } |
62 | |
63 | /** |
64 | * <!-- begin-user-doc --> |
65 | * <!-- end-user-doc --> |
66 | * @generated |
67 | */ |
68 | @Override |
69 | protected EClass eStaticClass() { |
70 | return LqnCorePackage.Literals.OUTPUT_ENTRY_DISTRIBUTION_TYPE; |
71 | } |
72 | |
73 | /** |
74 | * <!-- begin-user-doc --> |
75 | * <!-- end-user-doc --> |
76 | * @generated |
77 | */ |
78 | public BigInteger getPhase() { |
79 | return phase; |
80 | } |
81 | |
82 | /** |
83 | * <!-- begin-user-doc --> |
84 | * <!-- end-user-doc --> |
85 | * @generated |
86 | */ |
87 | public void setPhase(BigInteger newPhase) { |
88 | BigInteger oldPhase = phase; |
89 | phase = newPhase; |
90 | if (eNotificationRequired()) |
91 | eNotify(new ENotificationImpl(this, Notification.SET, LqnCorePackage.OUTPUT_ENTRY_DISTRIBUTION_TYPE__PHASE, oldPhase, phase)); |
92 | } |
93 | |
94 | /** |
95 | * <!-- begin-user-doc --> |
96 | * <!-- end-user-doc --> |
97 | * @generated |
98 | */ |
99 | @Override |
100 | public Object eGet(int featureID, boolean resolve, boolean coreType) { |
101 | switch (featureID) { |
102 | case LqnCorePackage.OUTPUT_ENTRY_DISTRIBUTION_TYPE__PHASE: |
103 | return getPhase(); |
104 | } |
105 | return super.eGet(featureID, resolve, coreType); |
106 | } |
107 | |
108 | /** |
109 | * <!-- begin-user-doc --> |
110 | * <!-- end-user-doc --> |
111 | * @generated |
112 | */ |
113 | @Override |
114 | public void eSet(int featureID, Object newValue) { |
115 | switch (featureID) { |
116 | case LqnCorePackage.OUTPUT_ENTRY_DISTRIBUTION_TYPE__PHASE: |
117 | setPhase((BigInteger)newValue); |
118 | return; |
119 | } |
120 | super.eSet(featureID, newValue); |
121 | } |
122 | |
123 | /** |
124 | * <!-- begin-user-doc --> |
125 | * <!-- end-user-doc --> |
126 | * @generated |
127 | */ |
128 | @Override |
129 | public void eUnset(int featureID) { |
130 | switch (featureID) { |
131 | case LqnCorePackage.OUTPUT_ENTRY_DISTRIBUTION_TYPE__PHASE: |
132 | setPhase(PHASE_EDEFAULT); |
133 | return; |
134 | } |
135 | super.eUnset(featureID); |
136 | } |
137 | |
138 | /** |
139 | * <!-- begin-user-doc --> |
140 | * <!-- end-user-doc --> |
141 | * @generated |
142 | */ |
143 | @Override |
144 | public boolean eIsSet(int featureID) { |
145 | switch (featureID) { |
146 | case LqnCorePackage.OUTPUT_ENTRY_DISTRIBUTION_TYPE__PHASE: |
147 | return PHASE_EDEFAULT == null ? phase != null : !PHASE_EDEFAULT.equals(phase); |
148 | } |
149 | return super.eIsSet(featureID); |
150 | } |
151 | |
152 | /** |
153 | * <!-- begin-user-doc --> |
154 | * <!-- end-user-doc --> |
155 | * @generated |
156 | */ |
157 | @Override |
158 | public String toString() { |
159 | if (eIsProxy()) return super.toString(); |
160 | |
161 | StringBuffer result = new StringBuffer(super.toString()); |
162 | result.append(" (phase: "); |
163 | result.append(phase); |
164 | result.append(')'); |
165 | return result.toString(); |
166 | } |
167 | |
168 | } //OutputEntryDistributionTypeImpl |