source: trunk/org.modelica.uml.sysml/src/org/modelica/uml/sysml/AccessKind.java

Last change on this file was 696, checked in by adrpo, 13 years ago
  • updates
File size: 4.5 KB
Line 
1/**
2 * <copyright>
3 * </copyright>
4 *
5 * $Id$
6 */
7package org.modelica.uml.sysml;
8
9import java.util.Arrays;
10import java.util.Collections;
11import java.util.List;
12
13import org.eclipse.emf.common.util.AbstractEnumerator;
14
15/**
16 * <!-- begin-user-doc -->
17 * A representation of the literals of the enumeration '<em><b>Access Kind</b></em>',
18 * and utility methods for working with them.
19 * <!-- end-user-doc -->
20 * @see org.modelica.uml.sysml.SysmlPackage#getAccessKind()
21 * @model
22 * @generated
23 */
24public final class AccessKind extends AbstractEnumerator {
25    /**
26     * The '<em><b>Public</b></em>' literal value.
27     * <!-- begin-user-doc -->
28     * <p>
29     * If the meaning of '<em><b>Public</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 #PUBLIC_LITERAL
34     * @model name="public"
35     * @generated
36     * @ordered
37     */
38    public static final int PUBLIC = 0;
39
40    /**
41     * The '<em><b>Protected</b></em>' literal value.
42     * <!-- begin-user-doc -->
43     * <p>
44     * If the meaning of '<em><b>Protected</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 #PROTECTED_LITERAL
49     * @model name="protected"
50     * @generated
51     * @ordered
52     */
53    public static final int PROTECTED = 2;
54
55    /**
56     * The '<em><b>Private</b></em>' literal value.
57     * <!-- begin-user-doc -->
58     * <p>
59     * If the meaning of '<em><b>Private</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 #PRIVATE_LITERAL
64     * @model name="private"
65     * @generated
66     * @ordered
67     */
68    public static final int PRIVATE = 1;
69
70    /**
71     * The '<em><b>Public</b></em>' literal object.
72     * <!-- begin-user-doc -->
73     * <!-- end-user-doc -->
74     * @see #PUBLIC
75     * @generated
76     * @ordered
77     */
78    public static final AccessKind PUBLIC_LITERAL = new AccessKind(PUBLIC, "public", "public");
79
80    /**
81     * The '<em><b>Protected</b></em>' literal object.
82     * <!-- begin-user-doc -->
83     * <!-- end-user-doc -->
84     * @see #PROTECTED
85     * @generated
86     * @ordered
87     */
88    public static final AccessKind PROTECTED_LITERAL = new AccessKind(PROTECTED, "protected", "protected");
89
90    /**
91     * The '<em><b>Private</b></em>' literal object.
92     * <!-- begin-user-doc -->
93     * <!-- end-user-doc -->
94     * @see #PRIVATE
95     * @generated
96     * @ordered
97     */
98    public static final AccessKind PRIVATE_LITERAL = new AccessKind(PRIVATE, "private", "private");
99
100    /**
101     * An array of all the '<em><b>Access Kind</b></em>' enumerators.
102     * <!-- begin-user-doc -->
103     * <!-- end-user-doc -->
104     * @generated
105     */
106    private static final AccessKind[] VALUES_ARRAY =
107        new AccessKind[] {
108            PUBLIC_LITERAL,
109            PROTECTED_LITERAL,
110            PRIVATE_LITERAL,
111        };
112
113    /**
114     * A public read-only list of all the '<em><b>Access Kind</b></em>' enumerators.
115     * <!-- begin-user-doc -->
116     * <!-- end-user-doc -->
117     * @generated
118     */
119    public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
120
121    /**
122     * Returns the '<em><b>Access Kind</b></em>' literal with the specified literal value.
123     * <!-- begin-user-doc -->
124     * <!-- end-user-doc -->
125     * @generated
126     */
127    public static AccessKind get(String literal) {
128        for (int i = 0; i < VALUES_ARRAY.length; ++i) {
129            AccessKind result = VALUES_ARRAY[i];
130            if (result.toString().equals(literal)) {
131                return result;
132            }
133        }
134        return null;
135    }
136
137    /**
138     * Returns the '<em><b>Access Kind</b></em>' literal with the specified name.
139     * <!-- begin-user-doc -->
140     * <!-- end-user-doc -->
141     * @generated
142     */
143    public static AccessKind getByName(String name) {
144        for (int i = 0; i < VALUES_ARRAY.length; ++i) {
145            AccessKind result = VALUES_ARRAY[i];
146            if (result.getName().equals(name)) {
147                return result;
148            }
149        }
150        return null;
151    }
152
153    /**
154     * Returns the '<em><b>Access Kind</b></em>' literal with the specified integer value.
155     * <!-- begin-user-doc -->
156     * <!-- end-user-doc -->
157     * @generated
158     */
159    public static AccessKind get(int value) {
160        switch (value) {
161            case PUBLIC: return PUBLIC_LITERAL;
162            case PROTECTED: return PROTECTED_LITERAL;
163            case PRIVATE: return PRIVATE_LITERAL;
164        }
165        return null;
166    }
167
168    /**
169     * Only this class can construct instances.
170     * <!-- begin-user-doc -->
171     * <!-- end-user-doc -->
172     * @generated
173     */
174    private AccessKind(int value, String name, String literal) {
175        super(value, name, literal);
176    }
177
178} //AccessKind
Note: See TracBrowser for help on using the repository browser.