Skip to content

Package: CompareType

CompareType

nameinstructionbranchcomplexitylinemethod
CompareType(String, int, int, String, String)
M: 0 C: 14
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
get(String)
M: 2 C: 19
90%
M: 1 C: 3
75%
M: 1 C: 2
67%
M: 1 C: 4
80%
M: 0 C: 1
100%
get(int)
M: 8 C: 0
0%
M: 3 C: 0
0%
M: 3 C: 0
0%
M: 4 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: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getName()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getValue()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
static {...}
M: 0 C: 45
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 7
100%
M: 0 C: 1
100%
toString()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%

Coverage

1: /**
2: * Copyright (c) 2011-2013 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: * Edgar Mueller - initial API and implementation
13: */
14: package org.eclipse.emf.ecp.view.spi.rule.model;
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>Compare Type</b></em>',
25: * and utility methods for working with them.
26: *
27: * @since 1.11
28: * <!-- end-user-doc -->
29: * @see org.eclipse.emf.ecp.view.spi.rule.model.RulePackage#getCompareType()
30: * @model
31: * @generated
32: */
33: public enum CompareType implements Enumerator {
34:         /**
35:          * The '<em><b>EQUALS</b></em>' literal object.
36:          * <!-- begin-user-doc -->
37:          * <!-- end-user-doc -->
38:          *
39:          * @see #EQUALS_VALUE
40:          * @generated
41:          * @ordered
42:          */
43:         EQUALS(0, "EQUALS", "EQUALS"), //$NON-NLS-1$ //$NON-NLS-2$
44:
45:         /**
46:          * The '<em><b>NOT EQUALS</b></em>' literal object.
47:          * <!-- begin-user-doc -->
48:          * <!-- end-user-doc -->
49:          *
50:          * @see #NOT_EQUALS_VALUE
51:          * @generated
52:          * @ordered
53:          */
54:         NOT_EQUALS(1, "NOT_EQUALS", "NOT_EQUALS"); //$NON-NLS-1$ //$NON-NLS-2$
55:
56:         /**
57:          * The '<em><b>EQUALS</b></em>' literal value.
58:          * <!-- begin-user-doc -->
59:          * <p>
60:          * If the meaning of '<em><b>EQUALS</b></em>' literal object isn't clear,
61:          * there really should be more of a description here...
62:          * </p>
63:          * <!-- end-user-doc -->
64:          *
65:          * @see #EQUALS
66:          * @model
67:          * @generated
68:          * @ordered
69:          */
70:         public static final int EQUALS_VALUE = 0;
71:
72:         /**
73:          * The '<em><b>NOT EQUALS</b></em>' literal value.
74:          * <!-- begin-user-doc -->
75:          * <p>
76:          * If the meaning of '<em><b>NOT EQUALS</b></em>' literal object isn't clear,
77:          * there really should be more of a description here...
78:          * </p>
79:          * <!-- end-user-doc -->
80:          *
81:          * @see #NOT_EQUALS
82:          * @model
83:          * @generated
84:          * @ordered
85:          */
86:         public static final int NOT_EQUALS_VALUE = 1;
87:
88:         /**
89:          * An array of all the '<em><b>Compare Type</b></em>' enumerators.
90:          * <!-- begin-user-doc -->
91:          * <!-- end-user-doc -->
92:          *
93:          * @generated
94:          */
95:         private static final CompareType[] VALUES_ARRAY = new CompareType[] {
96:                 EQUALS,
97:                 NOT_EQUALS,
98:         };
99:
100:         /**
101:          * A public read-only list of all the '<em><b>Compare Type</b></em>' enumerators.
102:          * <!-- begin-user-doc -->
103:          * <!-- end-user-doc -->
104:          *
105:          * @generated
106:          */
107:         public static final List<CompareType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
108:
109:         /**
110:          * Returns the '<em><b>Compare Type</b></em>' literal with the specified literal value.
111:          * <!-- begin-user-doc -->
112:          * <!-- end-user-doc -->
113:          *
114:          * @param literal the literal.
115:          * @return the matching enumerator or <code>null</code>.
116:          * @generated
117:          */
118:         public static CompareType get(String literal) {
119:•                for (int i = 0; i < VALUES_ARRAY.length; ++i) {
120:                         final CompareType result = VALUES_ARRAY[i];
121:•                        if (result.toString().equals(literal)) {
122:                                 return result;
123:                         }
124:                 }
125:                 return null;
126:         }
127:
128:         /**
129:          * Returns the '<em><b>Compare Type</b></em>' literal with the specified name.
130:          * <!-- begin-user-doc -->
131:          * <!-- end-user-doc -->
132:          *
133:          * @param name the name.
134:          * @return the matching enumerator or <code>null</code>.
135:          * @generated
136:          */
137:         public static CompareType getByName(String name) {
138:•                for (int i = 0; i < VALUES_ARRAY.length; ++i) {
139:                         final CompareType result = VALUES_ARRAY[i];
140:•                        if (result.getName().equals(name)) {
141:                                 return result;
142:                         }
143:                 }
144:                 return null;
145:         }
146:
147:         /**
148:          * Returns the '<em><b>Compare Type</b></em>' literal with the specified integer value.
149:          * <!-- begin-user-doc -->
150:          * <!-- end-user-doc -->
151:          *
152:          * @param value the integer value.
153:          * @return the matching enumerator or <code>null</code>.
154:          * @generated
155:          */
156:         public static CompareType get(int value) {
157:•                switch (value) {
158:                 case EQUALS_VALUE:
159:                         return EQUALS;
160:                 case NOT_EQUALS_VALUE:
161:                         return NOT_EQUALS;
162:                 }
163:                 return null;
164:         }
165:
166:         /**
167:          * <!-- begin-user-doc -->
168:          * <!-- end-user-doc -->
169:          *
170:          * @generated
171:          */
172:         private final int value;
173:
174:         /**
175:          * <!-- begin-user-doc -->
176:          * <!-- end-user-doc -->
177:          *
178:          * @generated
179:          */
180:         private final String name;
181:
182:         /**
183:          * <!-- begin-user-doc -->
184:          * <!-- end-user-doc -->
185:          *
186:          * @generated
187:          */
188:         private final String literal;
189:
190:         /**
191:          * Only this class can construct instances.
192:          * <!-- begin-user-doc -->
193:          * <!-- end-user-doc -->
194:          *
195:          * @generated
196:          */
197:         private CompareType(int value, String name, String literal) {
198:                 this.value = value;
199:                 this.name = name;
200:                 this.literal = literal;
201:         }
202:
203:         /**
204:          * <!-- begin-user-doc -->
205:          * <!-- end-user-doc -->
206:          *
207:          * @generated
208:          */
209:         @Override
210:         public int getValue() {
211:                 return value;
212:         }
213:
214:         /**
215:          * <!-- begin-user-doc -->
216:          * <!-- end-user-doc -->
217:          *
218:          * @generated
219:          */
220:         @Override
221:         public String getName() {
222:                 return name;
223:         }
224:
225:         /**
226:          * <!-- begin-user-doc -->
227:          * <!-- end-user-doc -->
228:          *
229:          * @generated
230:          */
231:         @Override
232:         public String getLiteral() {
233:                 return literal;
234:         }
235:
236:         /**
237:          * Returns the literal value of the enumerator, which is its string representation.
238:          * <!-- begin-user-doc -->
239:          * <!-- end-user-doc -->
240:          *
241:          * @generated
242:          */
243:         @Override
244:         public String toString() {
245:                 return literal;
246:         }
247:
248: } // CompareType