1 | /** |
2 | * <copyright> |
3 | * </copyright> |
4 | * |
5 | * $Id$ |
6 | */ |
7 | package de.uka.ipd.sdq.sensitivity.impl; |
8 | |
9 | import de.uka.ipd.sdq.pcm.reliability.FailureType; |
10 | |
11 | import de.uka.ipd.sdq.sensitivity.FailureTypeResultSpecification; |
12 | import de.uka.ipd.sdq.sensitivity.SensitivityPackage; |
13 | |
14 | import java.util.Collection; |
15 | |
16 | import org.eclipse.emf.common.util.EList; |
17 | |
18 | import org.eclipse.emf.ecore.EClass; |
19 | |
20 | import org.eclipse.emf.ecore.util.EObjectResolvingEList; |
21 | |
22 | /** |
23 | * <!-- begin-user-doc --> |
24 | * An implementation of the model object '<em><b>Failure Type Result Specification</b></em>'. |
25 | * <!-- end-user-doc --> |
26 | * <p> |
27 | * The following features are implemented: |
28 | * <ul> |
29 | * <li>{@link de.uka.ipd.sdq.sensitivity.impl.FailureTypeResultSpecificationImpl#getFailureTypes__FailureTypeResultSpecification <em>Failure Types Failure Type Result Specification</em>}</li> |
30 | * </ul> |
31 | * </p> |
32 | * |
33 | * @generated |
34 | */ |
35 | public class FailureTypeResultSpecificationImpl extends SensitivityResultSpecificationImpl implements FailureTypeResultSpecification { |
36 | /** |
37 | * The cached value of the '{@link #getFailureTypes__FailureTypeResultSpecification() <em>Failure Types Failure Type Result Specification</em>}' reference list. |
38 | * <!-- begin-user-doc --> |
39 | * <!-- end-user-doc --> |
40 | * @see #getFailureTypes__FailureTypeResultSpecification() |
41 | * @generated |
42 | * @ordered |
43 | */ |
44 | protected EList<FailureType> failureTypes__FailureTypeResultSpecification; |
45 | |
46 | /** |
47 | * <!-- begin-user-doc --> |
48 | * <!-- end-user-doc --> |
49 | * @generated |
50 | */ |
51 | protected FailureTypeResultSpecificationImpl() { |
52 | super(); |
53 | } |
54 | |
55 | /** |
56 | * <!-- begin-user-doc --> |
57 | * <!-- end-user-doc --> |
58 | * @generated |
59 | */ |
60 | @Override |
61 | protected EClass eStaticClass() { |
62 | return SensitivityPackage.Literals.FAILURE_TYPE_RESULT_SPECIFICATION; |
63 | } |
64 | |
65 | /** |
66 | * <!-- begin-user-doc --> |
67 | * <!-- end-user-doc --> |
68 | * @generated |
69 | */ |
70 | public EList<FailureType> getFailureTypes__FailureTypeResultSpecification() { |
71 | if (failureTypes__FailureTypeResultSpecification == null) { |
72 | failureTypes__FailureTypeResultSpecification = new EObjectResolvingEList<FailureType>(FailureType.class, this, SensitivityPackage.FAILURE_TYPE_RESULT_SPECIFICATION__FAILURE_TYPES_FAILURE_TYPE_RESULT_SPECIFICATION); |
73 | } |
74 | return failureTypes__FailureTypeResultSpecification; |
75 | } |
76 | |
77 | /** |
78 | * <!-- begin-user-doc --> |
79 | * <!-- end-user-doc --> |
80 | * @generated |
81 | */ |
82 | @Override |
83 | public Object eGet(int featureID, boolean resolve, boolean coreType) { |
84 | switch (featureID) { |
85 | case SensitivityPackage.FAILURE_TYPE_RESULT_SPECIFICATION__FAILURE_TYPES_FAILURE_TYPE_RESULT_SPECIFICATION: |
86 | return getFailureTypes__FailureTypeResultSpecification(); |
87 | } |
88 | return super.eGet(featureID, resolve, coreType); |
89 | } |
90 | |
91 | /** |
92 | * <!-- begin-user-doc --> |
93 | * <!-- end-user-doc --> |
94 | * @generated |
95 | */ |
96 | @SuppressWarnings("unchecked") |
97 | @Override |
98 | public void eSet(int featureID, Object newValue) { |
99 | switch (featureID) { |
100 | case SensitivityPackage.FAILURE_TYPE_RESULT_SPECIFICATION__FAILURE_TYPES_FAILURE_TYPE_RESULT_SPECIFICATION: |
101 | getFailureTypes__FailureTypeResultSpecification().clear(); |
102 | getFailureTypes__FailureTypeResultSpecification().addAll((Collection<? extends FailureType>)newValue); |
103 | return; |
104 | } |
105 | super.eSet(featureID, newValue); |
106 | } |
107 | |
108 | /** |
109 | * <!-- begin-user-doc --> |
110 | * <!-- end-user-doc --> |
111 | * @generated |
112 | */ |
113 | @Override |
114 | public void eUnset(int featureID) { |
115 | switch (featureID) { |
116 | case SensitivityPackage.FAILURE_TYPE_RESULT_SPECIFICATION__FAILURE_TYPES_FAILURE_TYPE_RESULT_SPECIFICATION: |
117 | getFailureTypes__FailureTypeResultSpecification().clear(); |
118 | return; |
119 | } |
120 | super.eUnset(featureID); |
121 | } |
122 | |
123 | /** |
124 | * <!-- begin-user-doc --> |
125 | * <!-- end-user-doc --> |
126 | * @generated |
127 | */ |
128 | @Override |
129 | public boolean eIsSet(int featureID) { |
130 | switch (featureID) { |
131 | case SensitivityPackage.FAILURE_TYPE_RESULT_SPECIFICATION__FAILURE_TYPES_FAILURE_TYPE_RESULT_SPECIFICATION: |
132 | return failureTypes__FailureTypeResultSpecification != null && !failureTypes__FailureTypeResultSpecification.isEmpty(); |
133 | } |
134 | return super.eIsSet(featureID); |
135 | } |
136 | |
137 | } //FailureTypeResultSpecificationImpl |