/**
 * <copyright>
 * </copyright>
 *
 * $Id: DirectionKind.java,v 1.1 2006/01/24 15:43:02 xblanc Exp $
 */
package org.eclipse.mddi.modelbus.description.abstract_;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

import org.eclipse.emf.common.util.AbstractEnumerator;

/**
 * <!-- begin-user-doc -->
 * A representation of the literals of the enumeration '<em><b>Direction Kind</b></em>',
 * and utility methods for working with them.
 * <!-- end-user-doc -->
 * @see org.eclipse.mddi.modelbus.description.abstract_.AbstractPackage#getDirectionKind()
 * @model
 * @generated
 */
public final class DirectionKind extends AbstractEnumerator {
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public static final String copyright = "Copyright (c) 2002-2003 IST-2004-2006-511731 ModelWare - ModelBus.  All rights reserved.This software is published under the terms of the ModelBus Software License in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. A copy of ModelBus Software License is provided with this distribution in doc/LICENSE.txt file.";

    /**
     * The '<em><b>In</b></em>' literal value.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #IN_LITERAL
     * @model name="in"
     * @generated
     * @ordered
     */
    public static final int IN = 0;

    /**
     * The '<em><b>Out</b></em>' literal value.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #OUT_LITERAL
     * @model name="out"
     * @generated
     * @ordered
     */
    public static final int OUT = 1;

    /**
     * The '<em><b>Inout</b></em>' literal value.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #INOUT_LITERAL
     * @model name="inout"
     * @generated
     * @ordered
     */
    public static final int INOUT = 2;

    /**
     * The '<em><b>Return</b></em>' literal value.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #RETURN_LITERAL
     * @model name="return"
     * @generated
     * @ordered
     */
    public static final int RETURN = 0;

    /**
     * The '<em><b>In</b></em>' literal object.
     * <!-- begin-user-doc -->
     * <p>
     * If the meaning of '<em><b>In</b></em>' literal object isn't clear,
     * there really should be more of a description here...
     * </p>
     * <!-- end-user-doc -->
     * @see #IN
     * @generated
     * @ordered
     */
    public static final DirectionKind IN_LITERAL = new DirectionKind(IN, "in");

    /**
     * The '<em><b>Out</b></em>' literal object.
     * <!-- begin-user-doc -->
     * <p>
     * If the meaning of '<em><b>Out</b></em>' literal object isn't clear,
     * there really should be more of a description here...
     * </p>
     * <!-- end-user-doc -->
     * @see #OUT
     * @generated
     * @ordered
     */
    public static final DirectionKind OUT_LITERAL = new DirectionKind(OUT, "out");

    /**
     * The '<em><b>Inout</b></em>' literal object.
     * <!-- begin-user-doc -->
     * <p>
     * If the meaning of '<em><b>Inout</b></em>' literal object isn't clear,
     * there really should be more of a description here...
     * </p>
     * <!-- end-user-doc -->
     * @see #INOUT
     * @generated
     * @ordered
     */
    public static final DirectionKind INOUT_LITERAL = new DirectionKind(INOUT, "inout");

    /**
     * The '<em><b>Return</b></em>' literal object.
     * <!-- begin-user-doc -->
     * <p>
     * If the meaning of '<em><b>Return</b></em>' literal object isn't clear,
     * there really should be more of a description here...
     * </p>
     * <!-- end-user-doc -->
     * @see #RETURN
     * @generated
     * @ordered
     */
    public static final DirectionKind RETURN_LITERAL = new DirectionKind(RETURN, "return");

    /**
     * An array of all the '<em><b>Direction Kind</b></em>' enumerators.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    private static final DirectionKind[] VALUES_ARRAY =
        new DirectionKind[] {
            IN_LITERAL,
            OUT_LITERAL,
            INOUT_LITERAL,
            RETURN_LITERAL,
        };

    /**
     * A public read-only list of all the '<em><b>Direction Kind</b></em>' enumerators.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));

    /**
     * Returns the '<em><b>Direction Kind</b></em>' literal with the specified name.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public static DirectionKind get(String name) {
        for (int i = 0; i < VALUES_ARRAY.length; ++i) {
            DirectionKind result = VALUES_ARRAY[i];
            if (result.toString().equals(name)) {
                return result;
            }
        }
        return null;
    }

    /**
     * Returns the '<em><b>Direction Kind</b></em>' literal with the specified value.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public static DirectionKind get(int value) {
        switch (value) {
            case IN: return IN_LITERAL;
            case OUT: return OUT_LITERAL;
            case INOUT: return INOUT_LITERAL;
        }
        return null;	
    }

    /**
     * Only this class can construct instances.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    private DirectionKind(int value, String name) {
        super(value, name);
    }

} //DirectionKind
