KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > emf > ecore > xml > namespace > SpaceType


1 /**
2  * <copyright>
3  *
4  * Copyright (c) 2003-2004 IBM Corporation and others.
5  * All rights reserved. This program and the accompanying materials
6  * are made available under the terms of the Eclipse Public License v1.0
7  * which accompanies this distribution, and is available at
8  * http://www.eclipse.org/legal/epl-v10.html
9  *
10  * Contributors:
11  * IBM - Initial API and implementation
12  *
13  * </copyright>
14  *
15  * $Id: SpaceType.java,v 1.2 2005/06/08 06:20:10 nickb Exp $
16  */

17 package org.eclipse.emf.ecore.xml.namespace;
18
19 import java.util.Arrays JavaDoc;
20 import java.util.Collections JavaDoc;
21 import java.util.List JavaDoc;
22
23 import org.eclipse.emf.common.util.AbstractEnumerator;
24
25 /**
26  * <!-- begin-user-doc -->
27  * A representation of the literals of the enumeration '<em><b>Space Type</b></em>',
28  * and utility methods for working with them.
29  * <!-- end-user-doc -->
30  * @see org.eclipse.emf.ecore.xml.namespace.XMLNamespacePackage#getSpaceType()
31  * @model
32  * @generated
33  */

34 public final class SpaceType extends AbstractEnumerator
35 {
36   /**
37    * The '<em><b>Default</b></em>' literal value.
38    * <!-- begin-user-doc -->
39    * <!-- end-user-doc -->
40    * @see #DEFAULT_LITERAL
41    * @model name="default"
42    * @generated
43    * @ordered
44    */

45   public static final int DEFAULT = 0;
46
47   /**
48    * The '<em><b>Preserve</b></em>' literal value.
49    * <!-- begin-user-doc -->
50    * <!-- end-user-doc -->
51    * @see #PRESERVE_LITERAL
52    * @model name="preserve"
53    * @generated
54    * @ordered
55    */

56   public static final int PRESERVE = 1;
57
58   /**
59    * The '<em><b>Default</b></em>' literal object.
60    * <!-- begin-user-doc -->
61    * <p>
62    * If the meaning of '<em><b>Default</b></em>' literal object isn't clear,
63    * there really should be more of a description here...
64    * </p>
65    * <!-- end-user-doc -->
66    * @see #DEFAULT
67    * @generated
68    * @ordered
69    */

70   public static final SpaceType DEFAULT_LITERAL = new SpaceType(DEFAULT, "default");
71
72   /**
73    * The '<em><b>Preserve</b></em>' literal object.
74    * <!-- begin-user-doc -->
75    * <p>
76    * If the meaning of '<em><b>Preserve</b></em>' literal object isn't clear,
77    * there really should be more of a description here...
78    * </p>
79    * <!-- end-user-doc -->
80    * @see #PRESERVE
81    * @generated
82    * @ordered
83    */

84   public static final SpaceType PRESERVE_LITERAL = new SpaceType(PRESERVE, "preserve");
85
86   /**
87    * An array of all the '<em><b>Space Type</b></em>' enumerators.
88    * <!-- begin-user-doc -->
89    * <!-- end-user-doc -->
90    * @generated
91    */

92   private static final SpaceType[] VALUES_ARRAY =
93     new SpaceType[]
94     {
95       DEFAULT_LITERAL,
96       PRESERVE_LITERAL,
97     };
98
99   /**
100    * A public read-only list of all the '<em><b>Space Type</b></em>' enumerators.
101    * <!-- begin-user-doc -->
102    * <!-- end-user-doc -->
103    * @generated
104    */

105   public static final List JavaDoc VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
106
107   /**
108    * Returns the '<em><b>Space Type</b></em>' literal with the specified name.
109    * <!-- begin-user-doc -->
110    * <!-- end-user-doc -->
111    * @generated
112    */

113   public static SpaceType get(String JavaDoc name)
114   {
115     for (int i = 0; i < VALUES_ARRAY.length; ++i)
116     {
117       SpaceType result = VALUES_ARRAY[i];
118       if (result.toString().equals(name))
119       {
120         return result;
121       }
122     }
123     return null;
124   }
125
126   /**
127    * Returns the '<em><b>Space Type</b></em>' literal with the specified value.
128    * <!-- begin-user-doc -->
129    * <!-- end-user-doc -->
130    * @generated
131    */

132   public static SpaceType get(int value)
133   {
134     switch (value)
135     {
136       case DEFAULT: return DEFAULT_LITERAL;
137       case PRESERVE: return PRESERVE_LITERAL;
138     }
139     return null;
140   }
141
142   /**
143    * Only this class can construct instances.
144    * <!-- begin-user-doc -->
145    * <!-- end-user-doc -->
146    * @generated
147    */

148   private SpaceType(int value, String JavaDoc name)
149   {
150     super(value, name);
151   }
152
153 } //SpaceType
154
Popular Tags