/******************************************************************************* * 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.config; 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 Type</b></em>', * and utility methods for working with them. * <!-- end-user-doc --> * @see org.oasisopen.names.tc.opendocument.xmlns.config.ConfigPackage#getTypeType() * @model extendedMetaData="name='type_._type'" * @generated */ public enum TypeType implements Enumerator { /** * The '<em><b>Boolean</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #BOOLEAN_VALUE * @generated * @ordered */ BOOLEAN(0, "boolean", "boolean"), /** * The '<em><b>Short</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #SHORT_VALUE * @generated * @ordered */ SHORT(1, "short", "short"), /** * The '<em><b>Int</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #INT_VALUE * @generated * @ordered */ INT(2, "int", "int"), /** * The '<em><b>Long</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #LONG_VALUE * @generated * @ordered */ LONG(3, "long", "long"), /** * The '<em><b>Double</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #DOUBLE_VALUE * @generated * @ordered */ DOUBLE(4, "double", "double"), /** * The '<em><b>String</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #STRING_VALUE * @generated * @ordered */ STRING(5, "string", "string"), /** * The '<em><b>Datetime</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #DATETIME_VALUE * @generated * @ordered */ DATETIME(6, "datetime", "datetime"), /** * The '<em><b>Base64 Binary</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #BASE64_BINARY_VALUE * @generated * @ordered */ BASE64_BINARY(7, "base64Binary", "base64Binary"); /** * The '<em><b>Boolean</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Boolean</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #BOOLEAN * @model name="boolean" * @generated * @ordered */ public static final int BOOLEAN_VALUE = 0; /** * The '<em><b>Short</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Short</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #SHORT * @model name="short" * @generated * @ordered */ public static final int SHORT_VALUE = 1; /** * The '<em><b>Int</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Int</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #INT * @model name="int" * @generated * @ordered */ public static final int INT_VALUE = 2; /** * The '<em><b>Long</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Long</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #LONG * @model name="long" * @generated * @ordered */ public static final int LONG_VALUE = 3; /** * The '<em><b>Double</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Double</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #DOUBLE * @model name="double" * @generated * @ordered */ public static final int DOUBLE_VALUE = 4; /** * The '<em><b>String</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>String</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #STRING * @model name="string" * @generated * @ordered */ public static final int STRING_VALUE = 5; /** * The '<em><b>Datetime</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Datetime</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #DATETIME * @model name="datetime" * @generated * @ordered */ public static final int DATETIME_VALUE = 6; /** * The '<em><b>Base64 Binary</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>Base64 Binary</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #BASE64_BINARY * @model name="base64Binary" * @generated * @ordered */ public static final int BASE64_BINARY_VALUE = 7; /** * An array of all the '<em><b>Type Type</b></em>' enumerators. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private static final TypeType[] VALUES_ARRAY = new TypeType[] { BOOLEAN, SHORT, INT, LONG, DOUBLE, STRING, DATETIME, BASE64_BINARY, }; /** * A public read-only list of all the '<em><b>Type Type</b></em>' enumerators. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static final List<TypeType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); /** * Returns the '<em><b>Type Type</b></em>' literal with the specified literal value. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static TypeType get(String literal) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { TypeType result = VALUES_ARRAY[i]; if (result.toString().equals(literal)) { return result; } } return null; } /** * Returns the '<em><b>Type Type</b></em>' literal with the specified name. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static TypeType getByName(String name) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { TypeType result = VALUES_ARRAY[i]; if (result.getName().equals(name)) { return result; } } return null; } /** * Returns the '<em><b>Type Type</b></em>' literal with the specified integer value. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static TypeType get(int value) { switch (value) { case BOOLEAN_VALUE: return BOOLEAN; case SHORT_VALUE: return SHORT; case INT_VALUE: return INT; case LONG_VALUE: return LONG; case DOUBLE_VALUE: return DOUBLE; case STRING_VALUE: return STRING; case DATETIME_VALUE: return DATETIME; case BASE64_BINARY_VALUE: return BASE64_BINARY; } 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 TypeType(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; } } //TypeType