blob: 4165f279c27b02c1e7016f61e94d5682b761ff7e [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2016 Fundación Tecnalia Research & Innovation.
*
* 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/org/documents/epl-2.0/EPL-2.0.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Huascar Espinoza - initial API and implementation
* Alejandra Ruíz - initial API and implementation
* Idoya Del Río - initial API and implementation
* Mari Carmen Palacios - initial API and implementation
* Angel López - initial API and implementation
*******************************************************************************/
/**
*/
package org.eclipse.opencert.apm.assuranceassets.assuranceasset;
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>Event Kind</b></em>',
* and utility methods for working with them.
* <!-- end-user-doc -->
* @see org.eclipse.opencert.apm.assuranceassets.assuranceasset.AssuranceassetPackage#getEventKind()
* @model
* @generated
*/
public enum EventKind implements Enumerator {
/**
* The '<em><b>Creation</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #CREATION_VALUE
* @generated
* @ordered
*/
CREATION(0, "Creation", "Creation"),
/**
* The '<em><b>Modification</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #MODIFICATION_VALUE
* @generated
* @ordered
*/
MODIFICATION(1, "Modification", "Modification"),
/**
* The '<em><b>Evaluation</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #EVALUATION_VALUE
* @generated
* @ordered
*/
EVALUATION(2, "Evaluation", "Evaluation"),
/**
* The '<em><b>Approval</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #APPROVAL_VALUE
* @generated
* @ordered
*/
APPROVAL(3, "Approval", "Approval"),
/**
* The '<em><b>Revocation</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #REVOCATION_VALUE
* @generated
* @ordered
*/
REVOCATION(4, "Revocation", "Revocation");
/**
* The '<em><b>Creation</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Creation</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #CREATION
* @model name="Creation"
* @generated
* @ordered
*/
public static final int CREATION_VALUE = 0;
/**
* The '<em><b>Modification</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Modification</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #MODIFICATION
* @model name="Modification"
* @generated
* @ordered
*/
public static final int MODIFICATION_VALUE = 1;
/**
* The '<em><b>Evaluation</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Evaluation</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #EVALUATION
* @model name="Evaluation"
* @generated
* @ordered
*/
public static final int EVALUATION_VALUE = 2;
/**
* The '<em><b>Approval</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Approval</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #APPROVAL
* @model name="Approval"
* @generated
* @ordered
*/
public static final int APPROVAL_VALUE = 3;
/**
* The '<em><b>Revocation</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Revocation</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #REVOCATION
* @model name="Revocation"
* @generated
* @ordered
*/
public static final int REVOCATION_VALUE = 4;
/**
* An array of all the '<em><b>Event Kind</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static final EventKind[] VALUES_ARRAY =
new EventKind[] {
CREATION,
MODIFICATION,
EVALUATION,
APPROVAL,
REVOCATION,
};
/**
* A public read-only list of all the '<em><b>Event Kind</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final List<EventKind> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the '<em><b>Event Kind</b></em>' literal with the specified literal value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static EventKind get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
EventKind result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Event Kind</b></em>' literal with the specified name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static EventKind getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
EventKind result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Event Kind</b></em>' literal with the specified integer value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static EventKind get(int value) {
switch (value) {
case CREATION_VALUE: return CREATION;
case MODIFICATION_VALUE: return MODIFICATION;
case EVALUATION_VALUE: return EVALUATION;
case APPROVAL_VALUE: return APPROVAL;
case REVOCATION_VALUE: return REVOCATION;
}
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 EventKind(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;
}
} //EventKind