001: /**
002: * <copyright>
003: * </copyright>
004: *
005: * $Id$
006: */package com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor;
007:
008: import java.util.Arrays;
009: import java.util.Collections;
010: import java.util.List;
011:
012: import org.eclipse.emf.common.util.AbstractEnumerator;
013:
014: /**
015: * <!-- begin-user-doc -->
016: * A representation of the literals of the enumeration '<em><b>Pattern Model</b></em>',
017: * and utility methods for working with them.
018: * <!-- end-user-doc -->
019: * @see com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.componentflowPackage#getPatternModel()
020: * @model
021: * @generated
022: */
023: public final class PatternModel extends AbstractEnumerator {
024: /**
025: * <!-- begin-user-doc -->
026: * <!-- end-user-doc -->
027: * @generated
028: */
029: public static final String copyright = "Copyright, Bostech Corp.";
030:
031: /**
032: * The '<em><b>Reg Expr</b></em>' literal value.
033: * <!-- begin-user-doc -->
034: * <p>
035: * If the meaning of '<em><b>Reg Expr</b></em>' literal object isn't clear,
036: * there really should be more of a description here...
037: * </p>
038: * <!-- end-user-doc -->
039: * @see #REG_EXPR_LITERAL
040: * @model name="RegExpr"
041: * @generated
042: * @ordered
043: */
044: public static final int REG_EXPR = 0;
045:
046: /**
047: * The '<em><b>Glob</b></em>' literal value.
048: * <!-- begin-user-doc -->
049: * <p>
050: * If the meaning of '<em><b>Glob</b></em>' literal object isn't clear,
051: * there really should be more of a description here...
052: * </p>
053: * <!-- end-user-doc -->
054: * @see #GLOB_LITERAL
055: * @model name="Glob"
056: * @generated
057: * @ordered
058: */
059: public static final int GLOB = 1;
060:
061: /**
062: * The '<em><b>Reg Expr</b></em>' literal object.
063: * <!-- begin-user-doc -->
064: * <!-- end-user-doc -->
065: * @see #REG_EXPR
066: * @generated
067: * @ordered
068: */
069: public static final PatternModel REG_EXPR_LITERAL = new PatternModel(
070: REG_EXPR, "RegExpr", "RegExpr");
071:
072: /**
073: * The '<em><b>Glob</b></em>' literal object.
074: * <!-- begin-user-doc -->
075: * <!-- end-user-doc -->
076: * @see #GLOB
077: * @generated
078: * @ordered
079: */
080: public static final PatternModel GLOB_LITERAL = new PatternModel(
081: GLOB, "Glob", "Glob");
082:
083: /**
084: * An array of all the '<em><b>Pattern Model</b></em>' enumerators.
085: * <!-- begin-user-doc -->
086: * <!-- end-user-doc -->
087: * @generated
088: */
089: private static final PatternModel[] VALUES_ARRAY = new PatternModel[] {
090: REG_EXPR_LITERAL, GLOB_LITERAL, };
091:
092: /**
093: * A public read-only list of all the '<em><b>Pattern Model</b></em>' enumerators.
094: * <!-- begin-user-doc -->
095: * <!-- end-user-doc -->
096: * @generated
097: */
098: public static final List VALUES = Collections
099: .unmodifiableList(Arrays.asList(VALUES_ARRAY));
100:
101: /**
102: * Returns the '<em><b>Pattern Model</b></em>' literal with the specified literal value.
103: * <!-- begin-user-doc -->
104: * <!-- end-user-doc -->
105: * @generated
106: */
107: public static PatternModel get(String literal) {
108: for (int i = 0; i < VALUES_ARRAY.length; ++i) {
109: PatternModel result = VALUES_ARRAY[i];
110: if (result.toString().equals(literal)) {
111: return result;
112: }
113: }
114: return null;
115: }
116:
117: /**
118: * Returns the '<em><b>Pattern Model</b></em>' literal with the specified name.
119: * <!-- begin-user-doc -->
120: * <!-- end-user-doc -->
121: * @generated
122: */
123: public static PatternModel getByName(String name) {
124: for (int i = 0; i < VALUES_ARRAY.length; ++i) {
125: PatternModel result = VALUES_ARRAY[i];
126: if (result.getName().equals(name)) {
127: return result;
128: }
129: }
130: return null;
131: }
132:
133: /**
134: * Returns the '<em><b>Pattern Model</b></em>' literal with the specified integer value.
135: * <!-- begin-user-doc -->
136: * <!-- end-user-doc -->
137: * @generated
138: */
139: public static PatternModel get(int value) {
140: switch (value) {
141: case REG_EXPR:
142: return REG_EXPR_LITERAL;
143: case GLOB:
144: return GLOB_LITERAL;
145: }
146: return null;
147: }
148:
149: /**
150: * Only this class can construct instances.
151: * <!-- begin-user-doc -->
152: * <!-- end-user-doc -->
153: * @generated
154: */
155: private PatternModel(int value, String name, String literal) {
156: super (value, name, literal);
157: }
158:
159: } //PatternModel
|