/******************************************************************************* * Copyright (c) 2006-2012 * Software Technology Group, Dresden University of Technology * DevBoost GmbH, Berlin, Amtsgericht Charlottenburg, HRB 140026 * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Software Technology Group - TU Dresden, Germany; * DevBoost GmbH - Berlin, Germany * - initial API and implementation ******************************************************************************/ /** * <copyright> * </copyright> * * $Id$ */ package org.oasisopen.names.tc.opendocument.xmlns.chart; 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>Symbol Name Type</b></em>', * and utility methods for working with them. * <!-- end-user-doc --> * @see org.oasisopen.names.tc.opendocument.xmlns.chart.ChartPackage#getSymbolNameType() * @model extendedMetaData="name='symbol-name_._type'" * @generated */ public enum SymbolNameType implements Enumerator { /** * The '<em><b>Square</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #SQUARE_VALUE * @generated * @ordered */ SQUARE(0, "square", "square"), /** * The '<em><b>Diamond</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #DIAMOND_VALUE * @generated * @ordered */ DIAMOND(1, "diamond", "diamond"), /** * The '<em><b>Arrow Down</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #ARROW_DOWN_VALUE * @generated * @ordered */ ARROW_DOWN(2, "arrowDown", "arrow-down"), /** * The '<em><b>Arrow Up</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #ARROW_UP_VALUE * @generated * @ordered */ ARROW_UP(3, "arrowUp", "arrow-up"), /** * The '<em><b>Arrow Right</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #ARROW_RIGHT_VALUE * @generated * @ordered */ ARROW_RIGHT(4, "arrowRight", "arrow-right"), /** * The '<em><b>Arrow Left</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #ARROW_LEFT_VALUE * @generated * @ordered */ ARROW_LEFT(5, "arrowLeft", "arrow-left"), /** * The '<em><b>Bow Tie</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #BOW_TIE_VALUE * @generated * @ordered */ BOW_TIE(6, "bowTie", "bow-tie"), /** * The '<em><b>Hourglass</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #HOURGLASS_VALUE * @generated * @ordered */ HOURGLASS(7, "hourglass", "hourglass"), /** * The '<em><b>Circle</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #CIRCLE_VALUE * @generated * @ordered */ CIRCLE(8, "circle", "circle"), /** * The '<em><b>Star</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #STAR_VALUE * @generated * @ordered */ STAR(9, "star", "star"), /** * The '<em><b>X</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #X_VALUE * @generated * @ordered */ X(10, "x", "x"), /** * The '<em><b>Plus</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #PLUS_VALUE * @generated * @ordered */ PLUS(11, "plus", "plus"), /** * The '<em><b>Asterisk</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #ASTERISK_VALUE * @generated * @ordered */ ASTERISK(12, "asterisk", "asterisk"), /** * The '<em><b>Horizontal Bar</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #HORIZONTAL_BAR_VALUE * @generated * @ordered */ HORIZONTAL_BAR(13, "horizontalBar", "horizontal-bar"), /** * The '<em><b>Vertical Bar</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #VERTICAL_BAR_VALUE * @generated * @ordered */ VERTICAL_BAR(14, "verticalBar", "vertical-bar"); /** * The '<em><b>Square</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Square</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #SQUARE * @model name="square" * @generated * @ordered */ public static final int SQUARE_VALUE = 0; /** * The '<em><b>Diamond</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Diamond</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #DIAMOND * @model name="diamond" * @generated * @ordered */ public static final int DIAMOND_VALUE = 1; /** * The '<em><b>Arrow Down</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Arrow Down</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #ARROW_DOWN * @model name="arrowDown" literal="arrow-down" * @generated * @ordered */ public static final int ARROW_DOWN_VALUE = 2; /** * The '<em><b>Arrow Up</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Arrow Up</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #ARROW_UP * @model name="arrowUp" literal="arrow-up" * @generated * @ordered */ public static final int ARROW_UP_VALUE = 3; /** * The '<em><b>Arrow Right</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Arrow Right</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #ARROW_RIGHT * @model name="arrowRight" literal="arrow-right" * @generated * @ordered */ public static final int ARROW_RIGHT_VALUE = 4; /** * The '<em><b>Arrow Left</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Arrow Left</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #ARROW_LEFT * @model name="arrowLeft" literal="arrow-left" * @generated * @ordered */ public static final int ARROW_LEFT_VALUE = 5; /** * The '<em><b>Bow Tie</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Bow Tie</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #BOW_TIE * @model name="bowTie" literal="bow-tie" * @generated * @ordered */ public static final int BOW_TIE_VALUE = 6; /** * The '<em><b>Hourglass</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Hourglass</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #HOURGLASS * @model name="hourglass" * @generated * @ordered */ public static final int HOURGLASS_VALUE = 7; /** * The '<em><b>Circle</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Circle</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #CIRCLE * @model name="circle" * @generated * @ordered */ public static final int CIRCLE_VALUE = 8; /** * The '<em><b>Star</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Star</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #STAR * @model name="star" * @generated * @ordered */ public static final int STAR_VALUE = 9; /** * The '<em><b>X</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>X</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #X * @model name="x" * @generated * @ordered */ public static final int X_VALUE = 10; /** * The '<em><b>Plus</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Plus</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #PLUS * @model name="plus" * @generated * @ordered */ public static final int PLUS_VALUE = 11; /** * The '<em><b>Asterisk</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Asterisk</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #ASTERISK * @model name="asterisk" * @generated * @ordered */ public static final int ASTERISK_VALUE = 12; /** * The '<em><b>Horizontal Bar</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Horizontal Bar</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #HORIZONTAL_BAR * @model name="horizontalBar" literal="horizontal-bar" * @generated * @ordered */ public static final int HORIZONTAL_BAR_VALUE = 13; /** * The '<em><b>Vertical Bar</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Vertical Bar</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #VERTICAL_BAR * @model name="verticalBar" literal="vertical-bar" * @generated * @ordered */ public static final int VERTICAL_BAR_VALUE = 14; /** * An array of all the '<em><b>Symbol Name Type</b></em>' enumerators. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private static final SymbolNameType[] VALUES_ARRAY = new SymbolNameType[] { SQUARE, DIAMOND, ARROW_DOWN, ARROW_UP, ARROW_RIGHT, ARROW_LEFT, BOW_TIE, HOURGLASS, CIRCLE, STAR, X, PLUS, ASTERISK, HORIZONTAL_BAR, VERTICAL_BAR, }; /** * A public read-only list of all the '<em><b>Symbol Name Type</b></em>' enumerators. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static final List<SymbolNameType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); /** * Returns the '<em><b>Symbol Name Type</b></em>' literal with the specified literal value. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static SymbolNameType get(String literal) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { SymbolNameType result = VALUES_ARRAY[i]; if (result.toString().equals(literal)) { return result; } } return null; } /** * Returns the '<em><b>Symbol Name Type</b></em>' literal with the specified name. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static SymbolNameType getByName(String name) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { SymbolNameType result = VALUES_ARRAY[i]; if (result.getName().equals(name)) { return result; } } return null; } /** * Returns the '<em><b>Symbol Name Type</b></em>' literal with the specified integer value. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static SymbolNameType get(int value) { switch (value) { case SQUARE_VALUE: return SQUARE; case DIAMOND_VALUE: return DIAMOND; case ARROW_DOWN_VALUE: return ARROW_DOWN; case ARROW_UP_VALUE: return ARROW_UP; case ARROW_RIGHT_VALUE: return ARROW_RIGHT; case ARROW_LEFT_VALUE: return ARROW_LEFT; case BOW_TIE_VALUE: return BOW_TIE; case HOURGLASS_VALUE: return HOURGLASS; case CIRCLE_VALUE: return CIRCLE; case STAR_VALUE: return STAR; case X_VALUE: return X; case PLUS_VALUE: return PLUS; case ASTERISK_VALUE: return ASTERISK; case HORIZONTAL_BAR_VALUE: return HORIZONTAL_BAR; case VERTICAL_BAR_VALUE: return VERTICAL_BAR; } 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 SymbolNameType(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; } } //SymbolNameType