/******************************************************************************* * 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.table; 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>Type Type1</b></em>', * and utility methods for working with them. * <!-- end-user-doc --> * @see org.oasisopen.names.tc.opendocument.xmlns.table.TablePackage#getTypeType1() * @model extendedMetaData="name='type_._1_._type'" * @generated */ public enum TypeType1 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>Member Difference</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #MEMBER_DIFFERENCE_VALUE * @generated * @ordered */ MEMBER_DIFFERENCE(1, "memberDifference", "member-difference"), /** * The '<em><b>Member Percentage</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #MEMBER_PERCENTAGE_VALUE * @generated * @ordered */ MEMBER_PERCENTAGE(2, "memberPercentage", "member-percentage"), /** * The '<em><b>Member Percentage Difference</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #MEMBER_PERCENTAGE_DIFFERENCE_VALUE * @generated * @ordered */ MEMBER_PERCENTAGE_DIFFERENCE(3, "memberPercentageDifference", "member-percentage-difference"), /** * The '<em><b>Running Total</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #RUNNING_TOTAL_VALUE * @generated * @ordered */ RUNNING_TOTAL(4, "runningTotal", "running-total"), /** * The '<em><b>Row Percentage</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #ROW_PERCENTAGE_VALUE * @generated * @ordered */ ROW_PERCENTAGE(5, "rowPercentage", "row-percentage"), /** * The '<em><b>Column Percentage</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #COLUMN_PERCENTAGE_VALUE * @generated * @ordered */ COLUMN_PERCENTAGE(6, "columnPercentage", "column-percentage"), /** * The '<em><b>Total Percentage</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #TOTAL_PERCENTAGE_VALUE * @generated * @ordered */ TOTAL_PERCENTAGE(7, "totalPercentage", "total-percentage"), /** * The '<em><b>Index</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #INDEX_VALUE * @generated * @ordered */ INDEX(8, "index", "index"); /** * 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>Member Difference</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Member Difference</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #MEMBER_DIFFERENCE * @model name="memberDifference" literal="member-difference" * @generated * @ordered */ public static final int MEMBER_DIFFERENCE_VALUE = 1; /** * The '<em><b>Member Percentage</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Member Percentage</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #MEMBER_PERCENTAGE * @model name="memberPercentage" literal="member-percentage" * @generated * @ordered */ public static final int MEMBER_PERCENTAGE_VALUE = 2; /** * The '<em><b>Member Percentage Difference</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Member Percentage Difference</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #MEMBER_PERCENTAGE_DIFFERENCE * @model name="memberPercentageDifference" literal="member-percentage-difference" * @generated * @ordered */ public static final int MEMBER_PERCENTAGE_DIFFERENCE_VALUE = 3; /** * The '<em><b>Running Total</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Running Total</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #RUNNING_TOTAL * @model name="runningTotal" literal="running-total" * @generated * @ordered */ public static final int RUNNING_TOTAL_VALUE = 4; /** * The '<em><b>Row Percentage</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Row Percentage</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #ROW_PERCENTAGE * @model name="rowPercentage" literal="row-percentage" * @generated * @ordered */ public static final int ROW_PERCENTAGE_VALUE = 5; /** * The '<em><b>Column Percentage</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Column Percentage</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #COLUMN_PERCENTAGE * @model name="columnPercentage" literal="column-percentage" * @generated * @ordered */ public static final int COLUMN_PERCENTAGE_VALUE = 6; /** * The '<em><b>Total Percentage</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Total Percentage</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #TOTAL_PERCENTAGE * @model name="totalPercentage" literal="total-percentage" * @generated * @ordered */ public static final int TOTAL_PERCENTAGE_VALUE = 7; /** * The '<em><b>Index</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Index</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #INDEX * @model name="index" * @generated * @ordered */ public static final int INDEX_VALUE = 8; /** * An array of all the '<em><b>Type Type1</b></em>' enumerators. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private static final TypeType1[] VALUES_ARRAY = new TypeType1[] { NONE, MEMBER_DIFFERENCE, MEMBER_PERCENTAGE, MEMBER_PERCENTAGE_DIFFERENCE, RUNNING_TOTAL, ROW_PERCENTAGE, COLUMN_PERCENTAGE, TOTAL_PERCENTAGE, INDEX, }; /** * A public read-only list of all the '<em><b>Type Type1</b></em>' enumerators. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static final List<TypeType1> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); /** * Returns the '<em><b>Type Type1</b></em>' literal with the specified literal value. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static TypeType1 get(String literal) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { TypeType1 result = VALUES_ARRAY[i]; if (result.toString().equals(literal)) { return result; } } return null; } /** * Returns the '<em><b>Type Type1</b></em>' literal with the specified name. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static TypeType1 getByName(String name) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { TypeType1 result = VALUES_ARRAY[i]; if (result.getName().equals(name)) { return result; } } return null; } /** * Returns the '<em><b>Type Type1</b></em>' literal with the specified integer value. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static TypeType1 get(int value) { switch (value) { case NONE_VALUE: return NONE; case MEMBER_DIFFERENCE_VALUE: return MEMBER_DIFFERENCE; case MEMBER_PERCENTAGE_VALUE: return MEMBER_PERCENTAGE; case MEMBER_PERCENTAGE_DIFFERENCE_VALUE: return MEMBER_PERCENTAGE_DIFFERENCE; case RUNNING_TOTAL_VALUE: return RUNNING_TOTAL; case ROW_PERCENTAGE_VALUE: return ROW_PERCENTAGE; case COLUMN_PERCENTAGE_VALUE: return COLUMN_PERCENTAGE; case TOTAL_PERCENTAGE_VALUE: return TOTAL_PERCENTAGE; case INDEX_VALUE: return INDEX; } 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 TypeType1(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; } } //TypeType1