/*******************************************************************************
 * 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>Safety Tactic</b></em>',
 * and utility methods for working with them.
 * <!-- end-user-doc -->
 * @see com.irtsaintexupery.pseim.pseim.PseimPackage#getSafetyTactic()
 * @model
 * @generated
 */
public enum SafetyTactic implements Enumerator {
	/**
	 * The '<em><b>Simplicity</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #SIMPLICITY_VALUE
	 * @generated
	 * @ordered
	 */
	SIMPLICITY(0, "Simplicity", "Simplicity"),

	/**
	 * The '<em><b>Substitution</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #SUBSTITUTION_VALUE
	 * @generated
	 * @ordered
	 */
	SUBSTITUTION(1, "Substitution", "Substitution"),

	/**
	 * The '<em><b>Sanity Check</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #SANITY_CHECK_VALUE
	 * @generated
	 * @ordered
	 */
	SANITY_CHECK(2, "Sanity_Check", "Sanity_Check"),

	/**
	 * The '<em><b>Condition Monitoring</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #CONDITION_MONITORING_VALUE
	 * @generated
	 * @ordered
	 */
	CONDITION_MONITORING(3, "Condition_Monitoring", "Condition_Monitoring"),

	/**
	 * The '<em><b>Comparison</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #COMPARISON_VALUE
	 * @generated
	 * @ordered
	 */
	COMPARISON(4, "Comparison", "Comparison"),

	/**
	 * The '<em><b>Diverse Redundancy</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #DIVERSE_REDUNDANCY_VALUE
	 * @generated
	 * @ordered
	 */
	DIVERSE_REDUNDANCY(5, "Diverse_Redundancy", "Diverse_Redundancy"),

	/**
	 * The '<em><b>Replication Redundancy</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #REPLICATION_REDUNDANCY_VALUE
	 * @generated
	 * @ordered
	 */
	REPLICATION_REDUNDANCY(6, "Replication_Redundancy", "Replication_Redundancy"),

	/**
	 * The '<em><b>Repair</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #REPAIR_VALUE
	 * @generated
	 * @ordered
	 */
	REPAIR(7, "Repair", "Repair"),

	/**
	 * The '<em><b>Degradation</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #DEGRADATION_VALUE
	 * @generated
	 * @ordered
	 */
	DEGRADATION(8, "Degradation", "Degradation"),

	/**
	 * The '<em><b>Voting</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #VOTING_VALUE
	 * @generated
	 * @ordered
	 */
	VOTING(9, "Voting", "Voting"),

	/**
	 * The '<em><b>Override</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #OVERRIDE_VALUE
	 * @generated
	 * @ordered
	 */
	OVERRIDE(10, "Override", "Override"),

	/**
	 * The '<em><b>Barrier</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #BARRIER_VALUE
	 * @generated
	 * @ordered
	 */
	BARRIER(11, "Barrier", "Barrier"),

	/**
	 * The '<em><b>Heartbeat</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #HEARTBEAT_VALUE
	 * @generated
	 * @ordered
	 */
	HEARTBEAT(12, "Heartbeat", "Heartbeat");

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

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

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

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

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

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

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

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

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

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

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

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

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

	/**
	 * An array of all the '<em><b>Safety Tactic</b></em>' enumerators.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private static final SafetyTactic[] VALUES_ARRAY = new SafetyTactic[] { SIMPLICITY, SUBSTITUTION, SANITY_CHECK,
			CONDITION_MONITORING, COMPARISON, DIVERSE_REDUNDANCY, REPLICATION_REDUNDANCY, REPAIR, DEGRADATION, VOTING,
			OVERRIDE, BARRIER, HEARTBEAT, };

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

	/**
	 * Returns the '<em><b>Safety Tactic</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 SafetyTactic get(String literal) {
		for (int i = 0; i < VALUES_ARRAY.length; ++i) {
			SafetyTactic result = VALUES_ARRAY[i];
			if (result.toString().equals(literal)) {
				return result;
			}
		}
		return null;
	}

	/**
	 * Returns the '<em><b>Safety Tactic</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 SafetyTactic getByName(String name) {
		for (int i = 0; i < VALUES_ARRAY.length; ++i) {
			SafetyTactic result = VALUES_ARRAY[i];
			if (result.getName().equals(name)) {
				return result;
			}
		}
		return null;
	}

	/**
	 * Returns the '<em><b>Safety Tactic</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 SafetyTactic get(int value) {
		switch (value) {
		case SIMPLICITY_VALUE:
			return SIMPLICITY;
		case SUBSTITUTION_VALUE:
			return SUBSTITUTION;
		case SANITY_CHECK_VALUE:
			return SANITY_CHECK;
		case CONDITION_MONITORING_VALUE:
			return CONDITION_MONITORING;
		case COMPARISON_VALUE:
			return COMPARISON;
		case DIVERSE_REDUNDANCY_VALUE:
			return DIVERSE_REDUNDANCY;
		case REPLICATION_REDUNDANCY_VALUE:
			return REPLICATION_REDUNDANCY;
		case REPAIR_VALUE:
			return REPAIR;
		case DEGRADATION_VALUE:
			return DEGRADATION;
		case VOTING_VALUE:
			return VOTING;
		case OVERRIDE_VALUE:
			return OVERRIDE;
		case BARRIER_VALUE:
			return BARRIER;
		case HEARTBEAT_VALUE:
			return HEARTBEAT;
		}
		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 SafetyTactic(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;
	}

} //SafetyTactic
