/** * <copyright> * </copyright> * * $Id$ */ package org.eclipse.amalgam.tutorials.emf.droid; import java.util.Arrays; import java.util.Collections; import java.util.List; import org.eclipse.emf.common.util.Enumerator; /** * <!-- begin-user-doc --> * A representation of the literals of the enumeration '<em><b>Auto Link Kind</b></em>', * and utility methods for working with them. * <!-- end-user-doc --> * @see org.eclipse.amalgam.tutorials.emf.droid.DroidPackage#getAutoLinkKind() * @model * @generated */ public enum AutoLinkKind implements Enumerator { /** * The '<em><b>None</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #NONE_VALUE * @generated * @ordered */ NONE(0, "none", "none"), /** * The '<em><b>Web</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #WEB_VALUE * @generated * @ordered */ WEB(1, "web", "web"), /** * The '<em><b>Email</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #EMAIL_VALUE * @generated * @ordered */ EMAIL(2, "email", "email"), /** * The '<em><b>Phone</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #PHONE_VALUE * @generated * @ordered */ PHONE(3, "phone", "phone"), /** * The '<em><b>Map</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #MAP_VALUE * @generated * @ordered */ MAP(4, "map", "map"), /** * The '<em><b>All</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #ALL_VALUE * @generated * @ordered */ ALL(5, "all", "all"); /** * The '<em><b>None</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>None</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #NONE * @model name="none" * @generated * @ordered */ public static final int NONE_VALUE = 0; /** * The '<em><b>Web</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Web</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #WEB * @model name="web" * @generated * @ordered */ public static final int WEB_VALUE = 1; /** * The '<em><b>Email</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Email</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #EMAIL * @model name="email" * @generated * @ordered */ public static final int EMAIL_VALUE = 2; /** * The '<em><b>Phone</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Phone</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #PHONE * @model name="phone" * @generated * @ordered */ public static final int PHONE_VALUE = 3; /** * The '<em><b>Map</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Map</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #MAP * @model name="map" * @generated * @ordered */ public static final int MAP_VALUE = 4; /** * The '<em><b>All</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>All</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #ALL * @model name="all" * @generated * @ordered */ public static final int ALL_VALUE = 5; /** * An array of all the '<em><b>Auto Link Kind</b></em>' enumerators. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private static final AutoLinkKind[] VALUES_ARRAY = new AutoLinkKind[] { NONE, WEB, EMAIL, PHONE, MAP, ALL, }; /** * A public read-only list of all the '<em><b>Auto Link Kind</b></em>' enumerators. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static final List<AutoLinkKind> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); /** * Returns the '<em><b>Auto Link Kind</b></em>' literal with the specified literal value. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static AutoLinkKind get(String literal) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { AutoLinkKind result = VALUES_ARRAY[i]; if (result.toString().equals(literal)) { return result; } } return null; } /** * Returns the '<em><b>Auto Link Kind</b></em>' literal with the specified name. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static AutoLinkKind getByName(String name) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { AutoLinkKind result = VALUES_ARRAY[i]; if (result.getName().equals(name)) { return result; } } return null; } /** * Returns the '<em><b>Auto Link Kind</b></em>' literal with the specified integer value. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static AutoLinkKind get(int value) { switch (value) { case NONE_VALUE: return NONE; case WEB_VALUE: return WEB; case EMAIL_VALUE: return EMAIL; case PHONE_VALUE: return PHONE; case MAP_VALUE: return MAP; case ALL_VALUE: return ALL; } return null; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private final int value; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private final String name; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private final String literal; /** * Only this class can construct instances. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private AutoLinkKind(int value, String name, String literal) { this.value = value; this.name = name; this.literal = literal; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public int getValue() { return value; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getName() { return name; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getLiteral() { return literal; } /** * Returns the literal value of the enumerator, which is its string representation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public String toString() { return literal; } } //AutoLinkKind