Skip to content

Package: RamType

RamType

nameinstructionbranchcomplexitylinemethod
RamType(String, int, int, String, String)
M: 14 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%
get(String)
M: 21 C: 0
0%
M: 4 C: 0
0%
M: 3 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%
get(int)
M: 6 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
getByName(String)
M: 21 C: 0
0%
M: 4 C: 0
0%
M: 3 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%
getLiteral()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getName()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getValue()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
static {...}
M: 45 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 7 C: 0
0%
M: 1 C: 0
0%
toString()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /**
2: * Copyright (c) 2011-2018 EclipseSource Muenchen GmbH and others.
3: *
4: * All rights reserved. This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License 2.0
6: * which accompanies this distribution, and is available at
7: * https://www.eclipse.org/legal/epl-2.0/
8: *
9: * SPDX-License-Identifier: EPL-2.0
10: *
11: * Contributors:
12: * EclipseSource Munich - initial API and implementation
13: */
14: package org.eclipse.emfforms.coffee.model.coffee;
15:
16: import java.util.Arrays;
17: import java.util.Collections;
18: import java.util.List;
19:
20: import org.eclipse.emf.common.util.Enumerator;
21:
22: /**
23: * <!-- begin-user-doc -->
24: * A representation of the literals of the enumeration '<em><b>Ram Type</b></em>',
25: * and utility methods for working with them.
26: * <!-- end-user-doc -->
27: *
28: * @see org.eclipse.emfforms.coffee.model.coffee.CoffeePackage#getRamType()
29: * @model
30: * @generated
31: */
32: public enum RamType implements Enumerator {
33:         /**
34:          * The '<em><b>SODIMM</b></em>' literal object.
35:          * <!-- begin-user-doc -->
36:          * <!-- end-user-doc -->
37:          *
38:          * @see #SODIMM_VALUE
39:          * @generated
40:          * @ordered
41:          */
42:         SODIMM(0, "SODIMM", "SO-DIMM"), //$NON-NLS-1$ //$NON-NLS-2$
43:
44:         /**
45:          * The '<em><b>SIDIMM</b></em>' literal object.
46:          * <!-- begin-user-doc -->
47:          * <!-- end-user-doc -->
48:          *
49:          * @see #SIDIMM_VALUE
50:          * @generated
51:          * @ordered
52:          */
53:         SIDIMM(0, "SIDIMM", "SI-DIMM"); //$NON-NLS-1$ //$NON-NLS-2$
54:
55:         /**
56:          * The '<em><b>SODIMM</b></em>' literal value.
57:          * <!-- begin-user-doc -->
58:          * <p>
59:          * If the meaning of '<em><b>SODIMM</b></em>' literal object isn't clear,
60:          * there really should be more of a description here...
61:          * </p>
62:          * <!-- end-user-doc -->
63:          *
64:          * @see #SODIMM
65:          * @model literal="SO-DIMM"
66:          * @generated
67:          * @ordered
68:          */
69:         public static final int SODIMM_VALUE = 0;
70:
71:         /**
72:          * The '<em><b>SIDIMM</b></em>' literal value.
73:          * <!-- begin-user-doc -->
74:          * <p>
75:          * If the meaning of '<em><b>SIDIMM</b></em>' literal object isn't clear,
76:          * there really should be more of a description here...
77:          * </p>
78:          * <!-- end-user-doc -->
79:          *
80:          * @see #SIDIMM
81:          * @model literal="SI-DIMM"
82:          * @generated
83:          * @ordered
84:          */
85:         public static final int SIDIMM_VALUE = 0;
86:
87:         /**
88:          * An array of all the '<em><b>Ram Type</b></em>' enumerators.
89:          * <!-- begin-user-doc -->
90:          * <!-- end-user-doc -->
91:          *
92:          * @generated
93:          */
94:         private static final RamType[] VALUES_ARRAY = new RamType[] {
95:                 SODIMM,
96:                 SIDIMM,
97:         };
98:
99:         /**
100:          * A public read-only list of all the '<em><b>Ram Type</b></em>' enumerators.
101:          * <!-- begin-user-doc -->
102:          * <!-- end-user-doc -->
103:          *
104:          * @generated
105:          */
106:         public static final List<RamType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
107:
108:         /**
109:          * Returns the '<em><b>Ram Type</b></em>' literal with the specified literal value.
110:          * <!-- begin-user-doc -->
111:          * <!-- end-user-doc -->
112:          *
113:          * @param literal the literal.
114:          * @return the matching enumerator or <code>null</code>.
115:          * @generated
116:          */
117:         public static RamType get(String literal) {
118:•                for (int i = 0; i < VALUES_ARRAY.length; ++i) {
119:                         final RamType result = VALUES_ARRAY[i];
120:•                        if (result.toString().equals(literal)) {
121:                                 return result;
122:                         }
123:                 }
124:                 return null;
125:         }
126:
127:         /**
128:          * Returns the '<em><b>Ram Type</b></em>' literal with the specified name.
129:          * <!-- begin-user-doc -->
130:          * <!-- end-user-doc -->
131:          *
132:          * @param name the name.
133:          * @return the matching enumerator or <code>null</code>.
134:          * @generated
135:          */
136:         public static RamType getByName(String name) {
137:•                for (int i = 0; i < VALUES_ARRAY.length; ++i) {
138:                         final RamType result = VALUES_ARRAY[i];
139:•                        if (result.getName().equals(name)) {
140:                                 return result;
141:                         }
142:                 }
143:                 return null;
144:         }
145:
146:         /**
147:          * Returns the '<em><b>Ram Type</b></em>' literal with the specified integer value.
148:          * <!-- begin-user-doc -->
149:          * <!-- end-user-doc -->
150:          *
151:          * @param value the integer value.
152:          * @return the matching enumerator or <code>null</code>.
153:          * @generated
154:          */
155:         public static RamType get(int value) {
156:•                switch (value) {
157:                 case SODIMM_VALUE:
158:                         return SODIMM;
159:                 }
160:                 return null;
161:         }
162:
163:         /**
164:          * <!-- begin-user-doc -->
165:          * <!-- end-user-doc -->
166:          *
167:          * @generated
168:          */
169:         private final int value;
170:
171:         /**
172:          * <!-- begin-user-doc -->
173:          * <!-- end-user-doc -->
174:          *
175:          * @generated
176:          */
177:         private final String name;
178:
179:         /**
180:          * <!-- begin-user-doc -->
181:          * <!-- end-user-doc -->
182:          *
183:          * @generated
184:          */
185:         private final String literal;
186:
187:         /**
188:          * Only this class can construct instances.
189:          * <!-- begin-user-doc -->
190:          * <!-- end-user-doc -->
191:          *
192:          * @generated
193:          */
194:         private RamType(int value, String name, String literal) {
195:                 this.value = value;
196:                 this.name = name;
197:                 this.literal = literal;
198:         }
199:
200:         /**
201:          * <!-- begin-user-doc -->
202:          * <!-- end-user-doc -->
203:          *
204:          * @generated
205:          */
206:         @Override
207:         public int getValue() {
208:                 return value;
209:         }
210:
211:         /**
212:          * <!-- begin-user-doc -->
213:          * <!-- end-user-doc -->
214:          *
215:          * @generated
216:          */
217:         @Override
218:         public String getName() {
219:                 return name;
220:         }
221:
222:         /**
223:          * <!-- begin-user-doc -->
224:          * <!-- end-user-doc -->
225:          *
226:          * @generated
227:          */
228:         @Override
229:         public String getLiteral() {
230:                 return literal;
231:         }
232:
233:         /**
234:          * Returns the literal value of the enumerator, which is its string representation.
235:          * <!-- begin-user-doc -->
236:          * <!-- end-user-doc -->
237:          *
238:          * @generated
239:          */
240:         @Override
241:         public String toString() {
242:                 return literal;
243:         }
244:
245: } // RamType