/******************************************************************************* * 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>Legend Position Type</b></em>', * and utility methods for working with them. * <!-- end-user-doc --> * @see org.oasisopen.names.tc.opendocument.xmlns.chart.ChartPackage#getLegendPositionType() * @model extendedMetaData="name='legend-position_._type'" * @generated */ public enum LegendPositionType implements Enumerator { /** * The '<em><b>Start</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #START_VALUE * @generated * @ordered */ START(0, "start", "start"), /** * The '<em><b>End</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #END_VALUE * @generated * @ordered */ END(1, "end", "end"), /** * The '<em><b>Top</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #TOP_VALUE * @generated * @ordered */ TOP(2, "top", "top"), /** * The '<em><b>Bottom</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #BOTTOM_VALUE * @generated * @ordered */ BOTTOM(3, "bottom", "bottom"), /** * The '<em><b>Top Start</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #TOP_START_VALUE * @generated * @ordered */ TOP_START(4, "topStart", "top-start"), /** * The '<em><b>Bottom Start</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #BOTTOM_START_VALUE * @generated * @ordered */ BOTTOM_START(5, "bottomStart", "bottom-start"), /** * The '<em><b>Top End</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #TOP_END_VALUE * @generated * @ordered */ TOP_END(6, "topEnd", "top-end"), /** * The '<em><b>Bottom End</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #BOTTOM_END_VALUE * @generated * @ordered */ BOTTOM_END(7, "bottomEnd", "bottom-end"); /** * The '<em><b>Start</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Start</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #START * @model name="start" * @generated * @ordered */ public static final int START_VALUE = 0; /** * The '<em><b>End</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>End</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #END * @model name="end" * @generated * @ordered */ public static final int END_VALUE = 1; /** * The '<em><b>Top</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Top</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #TOP * @model name="top" * @generated * @ordered */ public static final int TOP_VALUE = 2; /** * The '<em><b>Bottom</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Bottom</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #BOTTOM * @model name="bottom" * @generated * @ordered */ public static final int BOTTOM_VALUE = 3; /** * The '<em><b>Top Start</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Top Start</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #TOP_START * @model name="topStart" literal="top-start" * @generated * @ordered */ public static final int TOP_START_VALUE = 4; /** * The '<em><b>Bottom Start</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Bottom Start</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #BOTTOM_START * @model name="bottomStart" literal="bottom-start" * @generated * @ordered */ public static final int BOTTOM_START_VALUE = 5; /** * The '<em><b>Top End</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Top End</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #TOP_END * @model name="topEnd" literal="top-end" * @generated * @ordered */ public static final int TOP_END_VALUE = 6; /** * The '<em><b>Bottom End</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Bottom End</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #BOTTOM_END * @model name="bottomEnd" literal="bottom-end" * @generated * @ordered */ public static final int BOTTOM_END_VALUE = 7; /** * An array of all the '<em><b>Legend Position Type</b></em>' enumerators. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private static final LegendPositionType[] VALUES_ARRAY = new LegendPositionType[] { START, END, TOP, BOTTOM, TOP_START, BOTTOM_START, TOP_END, BOTTOM_END, }; /** * A public read-only list of all the '<em><b>Legend Position Type</b></em>' enumerators. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static final List<LegendPositionType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); /** * Returns the '<em><b>Legend Position Type</b></em>' literal with the specified literal value. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static LegendPositionType get(String literal) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { LegendPositionType result = VALUES_ARRAY[i]; if (result.toString().equals(literal)) { return result; } } return null; } /** * Returns the '<em><b>Legend Position Type</b></em>' literal with the specified name. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static LegendPositionType getByName(String name) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { LegendPositionType result = VALUES_ARRAY[i]; if (result.getName().equals(name)) { return result; } } return null; } /** * Returns the '<em><b>Legend Position Type</b></em>' literal with the specified integer value. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static LegendPositionType get(int value) { switch (value) { case START_VALUE: return START; case END_VALUE: return END; case TOP_VALUE: return TOP; case BOTTOM_VALUE: return BOTTOM; case TOP_START_VALUE: return TOP_START; case BOTTOM_START_VALUE: return BOTTOM_START; case TOP_END_VALUE: return TOP_END; case BOTTOM_END_VALUE: return BOTTOM_END; } 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 LegendPositionType(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; } } //LegendPositionType