blob: f38fb43ddd0e9c8d714031e6b150da18cd56de9a [file] [log] [blame]
nitindd6e591d2005-03-14 22:21:57 +00001/*******************************************************************************
amywuecebb042007-04-10 20:07:35 +00002 * Copyright (c) 2001, 2005 IBM Corporation and others.
nitindd6e591d2005-03-14 22:21:57 +00003 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
amywuecebb042007-04-10 20:07:35 +00007 *
nitindd6e591d2005-03-14 22:21:57 +00008 * Contributors:
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11package org.eclipse.wst.dtd.core.internal.emf;
12
13import java.util.Arrays;
14import java.util.Collections;
15import java.util.List;
16
17import org.eclipse.emf.common.util.AbstractEnumerator;
18
19/**
20 * <!-- begin-user-doc --> A representation of the literals of the enumeration '<em><b>Occurrence Type</b></em>',
21 * and utility methods for working with them. <!-- end-user-doc -->
22 *
23 * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDOccurrenceType()
24 * @model
25 * @generated
26 */
27public final class DTDOccurrenceType extends AbstractEnumerator {
28 /**
29 * The '<em><b>ONE</b></em>' literal value. <!-- begin-user-doc -->
30 * <!-- end-user-doc -->
31 *
32 * @see #ONE_LITERAL
33 * @model
34 * @generated
35 * @ordered
36 */
37 public static final int ONE = 49;
38
39 /**
40 * The '<em><b>OPTIONAL</b></em>' literal value. <!-- begin-user-doc
41 * --> <!-- end-user-doc -->
42 *
43 * @see #OPTIONAL_LITERAL
44 * @model
45 * @generated
46 * @ordered
47 */
48 public static final int OPTIONAL = 63;
49
50 /**
51 * The '<em><b>ONE OR MORE</b></em>' literal value. <!--
52 * begin-user-doc --> <!-- end-user-doc -->
53 *
54 * @see #ONE_OR_MORE_LITERAL
55 * @model
56 * @generated
57 * @ordered
58 */
59 public static final int ONE_OR_MORE = 43;
60
61 /**
62 * The '<em><b>ZERO OR MORE</b></em>' literal value. <!--
63 * begin-user-doc --> <!-- end-user-doc -->
64 *
65 * @see #ZERO_OR_MORE_LITERAL
66 * @model
67 * @generated
68 * @ordered
69 */
70 public static final int ZERO_OR_MORE = 42;
71
72 /**
73 * The '<em><b>ONE</b></em>' literal object. <!-- begin-user-doc -->
74 * <p>
75 * If the meaning of '<em><b>ONE</b></em>' literal object isn't
76 * clear, there really should be more of a description here...
77 * </p>
78 * <!-- end-user-doc -->
79 *
80 * @see #ONE
81 * @generated
82 * @ordered
83 */
david_williams38046012005-04-08 19:04:29 +000084 public static final DTDOccurrenceType ONE_LITERAL = new DTDOccurrenceType(ONE, "ONE"); //$NON-NLS-1$
nitindd6e591d2005-03-14 22:21:57 +000085
86 /**
87 * The '<em><b>OPTIONAL</b></em>' literal object. <!-- begin-user-doc
88 * -->
89 * <p>
90 * If the meaning of '<em><b>OPTIONAL</b></em>' literal object isn't
91 * clear, there really should be more of a description here...
92 * </p>
93 * <!-- end-user-doc -->
94 *
95 * @see #OPTIONAL
96 * @generated
97 * @ordered
98 */
david_williams38046012005-04-08 19:04:29 +000099 public static final DTDOccurrenceType OPTIONAL_LITERAL = new DTDOccurrenceType(OPTIONAL, "OPTIONAL"); //$NON-NLS-1$
nitindd6e591d2005-03-14 22:21:57 +0000100
101 /**
102 * The '<em><b>ONE OR MORE</b></em>' literal object. <!--
103 * begin-user-doc -->
104 * <p>
105 * If the meaning of '<em><b>ONE OR MORE</b></em>' literal object
106 * isn't clear, there really should be more of a description here...
107 * </p>
108 * <!-- end-user-doc -->
109 *
110 * @see #ONE_OR_MORE
111 * @generated
112 * @ordered
113 */
david_williams38046012005-04-08 19:04:29 +0000114 public static final DTDOccurrenceType ONE_OR_MORE_LITERAL = new DTDOccurrenceType(ONE_OR_MORE, "ONE_OR_MORE"); //$NON-NLS-1$
nitindd6e591d2005-03-14 22:21:57 +0000115
116 /**
117 * The '<em><b>ZERO OR MORE</b></em>' literal object. <!--
118 * begin-user-doc -->
119 * <p>
120 * If the meaning of '<em><b>ZERO OR MORE</b></em>' literal object
121 * isn't clear, there really should be more of a description here...
122 * </p>
123 * <!-- end-user-doc -->
124 *
125 * @see #ZERO_OR_MORE
126 * @generated
127 * @ordered
128 */
david_williams38046012005-04-08 19:04:29 +0000129 public static final DTDOccurrenceType ZERO_OR_MORE_LITERAL = new DTDOccurrenceType(ZERO_OR_MORE, "ZERO_OR_MORE"); //$NON-NLS-1$
nitindd6e591d2005-03-14 22:21:57 +0000130
131 /**
132 * An array of all the '<em><b>Occurrence Type</b></em>' enumerators.
133 * <!-- begin-user-doc --> <!-- end-user-doc -->
134 *
135 * @generated
136 */
137 private static final DTDOccurrenceType[] VALUES_ARRAY = new DTDOccurrenceType[]{ONE_LITERAL, OPTIONAL_LITERAL, ONE_OR_MORE_LITERAL, ZERO_OR_MORE_LITERAL,};
138
139 /**
140 * A public read-only list of all the '<em><b>Occurrence Type</b></em>'
141 * enumerators. <!-- begin-user-doc --> <!-- end-user-doc -->
142 *
143 * @generated
144 */
145 public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
146
147 /**
148 * Returns the '<em><b>Occurrence Type</b></em>' literal with the
149 * specified name. <!-- begin-user-doc --> <!-- end-user-doc -->
150 *
151 * @generated
152 */
153 public static DTDOccurrenceType get(String name) {
154 for (int i = 0; i < VALUES_ARRAY.length; ++i) {
155 DTDOccurrenceType result = VALUES_ARRAY[i];
156 if (result.toString().equals(name)) {
157 return result;
158 }
159 }
160 return null;
161 }
162
163 /**
164 * Returns the '<em><b>Occurrence Type</b></em>' literal with the
165 * specified value. <!-- begin-user-doc --> <!-- end-user-doc -->
166 *
167 * @generated
168 */
169 public static DTDOccurrenceType get(int value) {
170 switch (value) {
171 case ONE :
172 return ONE_LITERAL;
173 case OPTIONAL :
174 return OPTIONAL_LITERAL;
175 case ONE_OR_MORE :
176 return ONE_OR_MORE_LITERAL;
177 case ZERO_OR_MORE :
178 return ZERO_OR_MORE_LITERAL;
179 }
180 return null;
181 }
182
183 /**
184 * Only this class can construct instances. <!-- begin-user-doc --> <!--
185 * end-user-doc -->
186 *
187 * @generated
188 */
189 private DTDOccurrenceType(int value, String name) {
190 super(value, name);
191 }
192
193} // DTDOccurrenceType