Skip to content

Package: RenderMode

RenderMode

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