1 | /** |
---|
2 | * <copyright> |
---|
3 | * </copyright> |
---|
4 | * |
---|
5 | * $Id$ |
---|
6 | */ |
---|
7 | package org.modelica.uml.sysml; |
---|
8 | |
---|
9 | import java.util.Arrays; |
---|
10 | import java.util.Collections; |
---|
11 | import java.util.List; |
---|
12 | |
---|
13 | import org.eclipse.emf.common.util.AbstractEnumerator; |
---|
14 | |
---|
15 | /** |
---|
16 | * <!-- begin-user-doc --> |
---|
17 | * A representation of the literals of the enumeration '<em><b>Property Kind</b></em>', |
---|
18 | * and utility methods for working with them. |
---|
19 | * <!-- end-user-doc --> |
---|
20 | * @see org.modelica.uml.sysml.SysmlPackage#getPropertyKind() |
---|
21 | * @model |
---|
22 | * @generated |
---|
23 | */ |
---|
24 | public final class PropertyKind extends AbstractEnumerator { |
---|
25 | /** |
---|
26 | * The '<em><b>Parameter</b></em>' literal value. |
---|
27 | * <!-- begin-user-doc --> |
---|
28 | * <p> |
---|
29 | * If the meaning of '<em><b>Parameter</b></em>' literal object isn't clear, |
---|
30 | * there really should be more of a description here... |
---|
31 | * </p> |
---|
32 | * <!-- end-user-doc --> |
---|
33 | * @see #PARAMETER_LITERAL |
---|
34 | * @model name="parameter" |
---|
35 | * @generated |
---|
36 | * @ordered |
---|
37 | */ |
---|
38 | public static final int PARAMETER = 0; |
---|
39 | |
---|
40 | /** |
---|
41 | * The '<em><b>Part</b></em>' literal value. |
---|
42 | * <!-- begin-user-doc --> |
---|
43 | * <p> |
---|
44 | * If the meaning of '<em><b>Part</b></em>' literal object isn't clear, |
---|
45 | * there really should be more of a description here... |
---|
46 | * </p> |
---|
47 | * <!-- end-user-doc --> |
---|
48 | * @see #PART_LITERAL |
---|
49 | * @model name="part" |
---|
50 | * @generated |
---|
51 | * @ordered |
---|
52 | */ |
---|
53 | public static final int PART = 1; |
---|
54 | |
---|
55 | /** |
---|
56 | * The '<em><b>Variable</b></em>' literal value. |
---|
57 | * <!-- begin-user-doc --> |
---|
58 | * <p> |
---|
59 | * If the meaning of '<em><b>Variable</b></em>' literal object isn't clear, |
---|
60 | * there really should be more of a description here... |
---|
61 | * </p> |
---|
62 | * <!-- end-user-doc --> |
---|
63 | * @see #VARIABLE_LITERAL |
---|
64 | * @model name="variable" |
---|
65 | * @generated |
---|
66 | * @ordered |
---|
67 | */ |
---|
68 | public static final int VARIABLE = 2; |
---|
69 | |
---|
70 | /** |
---|
71 | * The '<em><b>Equation</b></em>' literal value. |
---|
72 | * <!-- begin-user-doc --> |
---|
73 | * <p> |
---|
74 | * If the meaning of '<em><b>Equation</b></em>' literal object isn't clear, |
---|
75 | * there really should be more of a description here... |
---|
76 | * </p> |
---|
77 | * <!-- end-user-doc --> |
---|
78 | * @see #EQUATION_LITERAL |
---|
79 | * @model name="equation" |
---|
80 | * @generated |
---|
81 | * @ordered |
---|
82 | */ |
---|
83 | public static final int EQUATION = 3; |
---|
84 | |
---|
85 | /** |
---|
86 | * The '<em><b>Parameter</b></em>' literal object. |
---|
87 | * <!-- begin-user-doc --> |
---|
88 | * <!-- end-user-doc --> |
---|
89 | * @see #PARAMETER |
---|
90 | * @generated |
---|
91 | * @ordered |
---|
92 | */ |
---|
93 | public static final PropertyKind PARAMETER_LITERAL = new PropertyKind(PARAMETER, "parameter", "parameter"); |
---|
94 | |
---|
95 | /** |
---|
96 | * The '<em><b>Part</b></em>' literal object. |
---|
97 | * <!-- begin-user-doc --> |
---|
98 | * <!-- end-user-doc --> |
---|
99 | * @see #PART |
---|
100 | * @generated |
---|
101 | * @ordered |
---|
102 | */ |
---|
103 | public static final PropertyKind PART_LITERAL = new PropertyKind(PART, "part", "part"); |
---|
104 | |
---|
105 | /** |
---|
106 | * The '<em><b>Variable</b></em>' literal object. |
---|
107 | * <!-- begin-user-doc --> |
---|
108 | * <!-- end-user-doc --> |
---|
109 | * @see #VARIABLE |
---|
110 | * @generated |
---|
111 | * @ordered |
---|
112 | */ |
---|
113 | public static final PropertyKind VARIABLE_LITERAL = new PropertyKind(VARIABLE, "variable", "variable"); |
---|
114 | |
---|
115 | /** |
---|
116 | * The '<em><b>Equation</b></em>' literal object. |
---|
117 | * <!-- begin-user-doc --> |
---|
118 | * <!-- end-user-doc --> |
---|
119 | * @see #EQUATION |
---|
120 | * @generated |
---|
121 | * @ordered |
---|
122 | */ |
---|
123 | public static final PropertyKind EQUATION_LITERAL = new PropertyKind(EQUATION, "equation", "equation"); |
---|
124 | |
---|
125 | /** |
---|
126 | * An array of all the '<em><b>Property Kind</b></em>' enumerators. |
---|
127 | * <!-- begin-user-doc --> |
---|
128 | * <!-- end-user-doc --> |
---|
129 | * @generated |
---|
130 | */ |
---|
131 | private static final PropertyKind[] VALUES_ARRAY = |
---|
132 | new PropertyKind[] { |
---|
133 | PARAMETER_LITERAL, |
---|
134 | PART_LITERAL, |
---|
135 | VARIABLE_LITERAL, |
---|
136 | EQUATION_LITERAL, |
---|
137 | }; |
---|
138 | |
---|
139 | /** |
---|
140 | * A public read-only list of all the '<em><b>Property Kind</b></em>' enumerators. |
---|
141 | * <!-- begin-user-doc --> |
---|
142 | * <!-- end-user-doc --> |
---|
143 | * @generated |
---|
144 | */ |
---|
145 | public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); |
---|
146 | |
---|
147 | /** |
---|
148 | * Returns the '<em><b>Property Kind</b></em>' literal with the specified literal value. |
---|
149 | * <!-- begin-user-doc --> |
---|
150 | * <!-- end-user-doc --> |
---|
151 | * @generated |
---|
152 | */ |
---|
153 | public static PropertyKind get(String literal) { |
---|
154 | for (int i = 0; i < VALUES_ARRAY.length; ++i) { |
---|
155 | PropertyKind result = VALUES_ARRAY[i]; |
---|
156 | if (result.toString().equals(literal)) { |
---|
157 | return result; |
---|
158 | } |
---|
159 | } |
---|
160 | return null; |
---|
161 | } |
---|
162 | |
---|
163 | /** |
---|
164 | * Returns the '<em><b>Property Kind</b></em>' literal with the specified name. |
---|
165 | * <!-- begin-user-doc --> |
---|
166 | * <!-- end-user-doc --> |
---|
167 | * @generated |
---|
168 | */ |
---|
169 | public static PropertyKind getByName(String name) { |
---|
170 | for (int i = 0; i < VALUES_ARRAY.length; ++i) { |
---|
171 | PropertyKind result = VALUES_ARRAY[i]; |
---|
172 | if (result.getName().equals(name)) { |
---|
173 | return result; |
---|
174 | } |
---|
175 | } |
---|
176 | return null; |
---|
177 | } |
---|
178 | |
---|
179 | /** |
---|
180 | * Returns the '<em><b>Property Kind</b></em>' literal with the specified integer value. |
---|
181 | * <!-- begin-user-doc --> |
---|
182 | * <!-- end-user-doc --> |
---|
183 | * @generated |
---|
184 | */ |
---|
185 | public static PropertyKind get(int value) { |
---|
186 | switch (value) { |
---|
187 | case PARAMETER: return PARAMETER_LITERAL; |
---|
188 | case PART: return PART_LITERAL; |
---|
189 | case VARIABLE: return VARIABLE_LITERAL; |
---|
190 | case EQUATION: return EQUATION_LITERAL; |
---|
191 | } |
---|
192 | return null; |
---|
193 | } |
---|
194 | |
---|
195 | /** |
---|
196 | * Only this class can construct instances. |
---|
197 | * <!-- begin-user-doc --> |
---|
198 | * <!-- end-user-doc --> |
---|
199 | * @generated |
---|
200 | */ |
---|
201 | private PropertyKind(int value, String name, String literal) { |
---|
202 | super(value, name, literal); |
---|
203 | } |
---|
204 | |
---|
205 | } //PropertyKind |
---|