/*******************************************************************************
 * Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/legal/epl-2.0
 *
 * Contributors:
 *     Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
 *******************************************************************************/
/**
 */
package com.irtsaintexupery.pseim.pseim;

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>Link Type</b></em>',
 * and utility methods for working with them.
 * <!-- end-user-doc -->
 * @see com.irtsaintexupery.pseim.pseim.PseimPackage#getLinkType()
 * @model
 * @generated
 */
public enum LinkType implements Enumerator {
	/**
	 * The '<em><b>TRANSPOSE</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #TRANSPOSE_VALUE
	 * @generated
	 * @ordered
	 */
	TRANSPOSE(4, "TRANSPOSE", "TRANSPOSE"),

	/**
	 * The '<em><b>IDENTITY</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #IDENTITY_VALUE
	 * @generated
	 * @ordered
	 */
	IDENTITY(0, "IDENTITY", "IDENTITY"),

	/**
	 * The '<em><b>SHIFTC</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #SHIFTC_VALUE
	 * @generated
	 * @ordered
	 */
	SHIFTC(9, "SHIFTC", "SHIFTC"),
	/**
	 * The '<em><b>FIRST</b></em>' literal object.
	 * <!-- begin-user-doc -->
	* <!-- end-user-doc -->
	 * @see #FIRST_VALUE
	 * @generated
	 * @ordered
	 */
	FIRST(1, "FIRST", "FIRST"),

	/**
	 * The '<em><b>ROTATE</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #ROTATE_VALUE
	 * @generated
	 * @ordered
	 */
	ROTATE(3, "ROTATE", "ROTATE"),
	/**
	 * The '<em><b>JOINC</b></em>' literal object.
	 * <!-- begin-user-doc -->
	* <!-- end-user-doc -->
	 * @see #JOINC_VALUE
	 * @generated
	 * @ordered
	 */
	JOINC(7, "JOINC", "JOINC"),
	/**
	 * The '<em><b>JOINP</b></em>' literal object.
	 * <!-- begin-user-doc -->
	* <!-- end-user-doc -->
	 * @see #JOINP_VALUE
	 * @generated
	 * @ordered
	 */
	JOINP(8, "JOINP", "JOINP"),
	/**
	 * The '<em><b>FORKC</b></em>' literal object.
	 * <!-- begin-user-doc -->
	* <!-- end-user-doc -->
	 * @see #FORKC_VALUE
	 * @generated
	 * @ordered
	 */
	FORKC(5, "FORKC", "FORKC"),
	/**
	 * The '<em><b>FORKP</b></em>' literal object.
	 * <!-- begin-user-doc -->
	* <!-- end-user-doc -->
	 * @see #FORKP_VALUE
	 * @generated
	 * @ordered
	 */
	FORKP(6, "FORKP", "FORKP"),
	/**
	 * The '<em><b>SHIFTP</b></em>' literal object.
	 * <!-- begin-user-doc -->
	* <!-- end-user-doc -->
	 * @see #SHIFTP_VALUE
	 * @generated
	 * @ordered
	 */
	SHIFTP(10, "SHIFTP", "SHIFTP"),
	/**
	 * The '<em><b>FLATTENC</b></em>' literal object.
	 * <!-- begin-user-doc -->
	* <!-- end-user-doc -->
	 * @see #FLATTENC_VALUE
	 * @generated
	 * @ordered
	 */
	FLATTENC(11, "FLATTENC", "FLATTENC"),
	/**
	 * The '<em><b>LAST</b></em>' literal object.
	 * <!-- begin-user-doc -->
	* <!-- end-user-doc -->
	 * @see #LAST_VALUE
	 * @generated
	 * @ordered
	 */
	LAST(2, "LAST", "LAST");

	/**
	 * The '<em><b>TRANSPOSE</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>TRANSPOSE</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #TRANSPOSE
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int TRANSPOSE_VALUE = 4;

	/**
	 * The '<em><b>IDENTITY</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>IDENTITY</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #IDENTITY
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int IDENTITY_VALUE = 0;

	/**
	 * The '<em><b>SHIFTC</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>SHIFTC</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #SHIFTC
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int SHIFTC_VALUE = 9;

	/**
	 * The '<em><b>FIRST</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>FIRST</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #FIRST
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int FIRST_VALUE = 1;

	/**
	 * The '<em><b>ROTATE</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>ROTATE</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #ROTATE
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int ROTATE_VALUE = 3;

	/**
	 * The '<em><b>JOINC</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>JOINC</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #JOINC
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int JOINC_VALUE = 7;

	/**
	 * The '<em><b>JOINP</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>JOINP</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #JOINP
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int JOINP_VALUE = 8;

	/**
	 * The '<em><b>FORKC</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>FORKC</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #FORKC
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int FORKC_VALUE = 5;

	/**
	 * The '<em><b>FORKP</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>FORKP</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #FORKP
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int FORKP_VALUE = 6;

	/**
	 * The '<em><b>SHIFTP</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>SHIFTP</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #SHIFTP
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int SHIFTP_VALUE = 10;

	/**
	 * The '<em><b>FLATTENC</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>FLATTENC</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #FLATTENC
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int FLATTENC_VALUE = 11;

	/**
	 * The '<em><b>LAST</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>LAST</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #LAST
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int LAST_VALUE = 2;

	/**
	 * An array of all the '<em><b>Link Type</b></em>' enumerators.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private static final LinkType[] VALUES_ARRAY = new LinkType[] { TRANSPOSE, IDENTITY, SHIFTC, FIRST, ROTATE, JOINC,
			JOINP, FORKC, FORKP, SHIFTP, FLATTENC, LAST, };

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

	/**
	 * Returns the '<em><b>Link Type</b></em>' literal with the specified literal value.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @param literal the literal.
	 * @return the matching enumerator or <code>null</code>.
	 * @generated
	 */
	public static LinkType get(String literal) {
		for (int i = 0; i < VALUES_ARRAY.length; ++i) {
			LinkType result = VALUES_ARRAY[i];
			if (result.toString().equals(literal)) {
				return result;
			}
		}
		return null;
	}

	/**
	 * Returns the '<em><b>Link Type</b></em>' literal with the specified name.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @param name the name.
	 * @return the matching enumerator or <code>null</code>.
	 * @generated
	 */
	public static LinkType getByName(String name) {
		for (int i = 0; i < VALUES_ARRAY.length; ++i) {
			LinkType result = VALUES_ARRAY[i];
			if (result.getName().equals(name)) {
				return result;
			}
		}
		return null;
	}

	/**
	 * Returns the '<em><b>Link Type</b></em>' literal with the specified integer value.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @param value the integer value.
	 * @return the matching enumerator or <code>null</code>.
	 * @generated
	 */
	public static LinkType get(int value) {
		switch (value) {
		case TRANSPOSE_VALUE:
			return TRANSPOSE;
		case IDENTITY_VALUE:
			return IDENTITY;
		case SHIFTC_VALUE:
			return SHIFTC;
		case FIRST_VALUE:
			return FIRST;
		case ROTATE_VALUE:
			return ROTATE;
		case JOINC_VALUE:
			return JOINC;
		case JOINP_VALUE:
			return JOINP;
		case FORKC_VALUE:
			return FORKC;
		case FORKP_VALUE:
			return FORKP;
		case SHIFTP_VALUE:
			return SHIFTP;
		case FLATTENC_VALUE:
			return FLATTENC;
		case LAST_VALUE:
			return LAST;
		}
		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 LinkType(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;
	}

} //LinkType
