| /** |
| * Copyright (c)2020 CEA LIST, Committer Name, and others. |
| * |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License 2.0 |
| * which accompanies this distribution, and is available at |
| * https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * Contributors: |
| * CEA LIST - Initial API and implementation |
| * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr |
| * Gabriel Pedroza (CEA LIST) gabriel.pedroza@cea.fr |
| * |
| */ |
| package org.eclipse.papyrus.pdp4eng.req.profile.pdp4engReqGDPR; |
| |
| 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>Pseudonym Kind</b></em>', |
| * and utility methods for working with them. |
| * <!-- end-user-doc --> |
| * @see org.eclipse.papyrus.pdp4eng.req.profile.pdp4engReqGDPR.pdp4engReqGDPRPackage#getPseudonymKind() |
| * @model |
| * @generated |
| */ |
| public enum PseudonymKind implements Enumerator { |
| /** |
| * The '<em><b>Person</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #PERSON_VALUE |
| * @generated |
| * @ordered |
| */ |
| PERSON(0, "Person", "Person"), |
| |
| /** |
| * The '<em><b>Role</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #ROLE_VALUE |
| * @generated |
| * @ordered |
| */ |
| ROLE(1, "role", "role"), |
| |
| /** |
| * The '<em><b>Relation Ship</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #RELATION_SHIP_VALUE |
| * @generated |
| * @ordered |
| */ |
| RELATION_SHIP(2, "relationShip", "relationShip"), |
| |
| /** |
| * The '<em><b>Role Relation Ship</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #ROLE_RELATION_SHIP_VALUE |
| * @generated |
| * @ordered |
| */ |
| ROLE_RELATION_SHIP(3, "roleRelationShip", "roleRelationShip"), |
| |
| /** |
| * The '<em><b>Transaction</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #TRANSACTION_VALUE |
| * @generated |
| * @ordered |
| */ |
| TRANSACTION(4, "transaction", "transaction"); |
| |
| /** |
| * The '<em><b>Person</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #PERSON |
| * @model name="Person" |
| * @generated |
| * @ordered |
| */ |
| public static final int PERSON_VALUE = 0; |
| |
| /** |
| * The '<em><b>Role</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #ROLE |
| * @model name="role" |
| * @generated |
| * @ordered |
| */ |
| public static final int ROLE_VALUE = 1; |
| |
| /** |
| * The '<em><b>Relation Ship</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #RELATION_SHIP |
| * @model name="relationShip" |
| * @generated |
| * @ordered |
| */ |
| public static final int RELATION_SHIP_VALUE = 2; |
| |
| /** |
| * The '<em><b>Role Relation Ship</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #ROLE_RELATION_SHIP |
| * @model name="roleRelationShip" |
| * @generated |
| * @ordered |
| */ |
| public static final int ROLE_RELATION_SHIP_VALUE = 3; |
| |
| /** |
| * The '<em><b>Transaction</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #TRANSACTION |
| * @model name="transaction" |
| * @generated |
| * @ordered |
| */ |
| public static final int TRANSACTION_VALUE = 4; |
| |
| /** |
| * An array of all the '<em><b>Pseudonym Kind</b></em>' enumerators. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private static final PseudonymKind[] VALUES_ARRAY = |
| new PseudonymKind[] { |
| PERSON, |
| ROLE, |
| RELATION_SHIP, |
| ROLE_RELATION_SHIP, |
| TRANSACTION, |
| }; |
| |
| /** |
| * A public read-only list of all the '<em><b>Pseudonym Kind</b></em>' enumerators. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static final List<PseudonymKind> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); |
| |
| /** |
| * Returns the '<em><b>Pseudonym Kind</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 PseudonymKind get(String literal) { |
| for (int i = 0; i < VALUES_ARRAY.length; ++i) { |
| PseudonymKind result = VALUES_ARRAY[i]; |
| if (result.toString().equals(literal)) { |
| return result; |
| } |
| } |
| return null; |
| } |
| |
| /** |
| * Returns the '<em><b>Pseudonym Kind</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 PseudonymKind getByName(String name) { |
| for (int i = 0; i < VALUES_ARRAY.length; ++i) { |
| PseudonymKind result = VALUES_ARRAY[i]; |
| if (result.getName().equals(name)) { |
| return result; |
| } |
| } |
| return null; |
| } |
| |
| /** |
| * Returns the '<em><b>Pseudonym Kind</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 PseudonymKind get(int value) { |
| switch (value) { |
| case PERSON_VALUE: return PERSON; |
| case ROLE_VALUE: return ROLE; |
| case RELATION_SHIP_VALUE: return RELATION_SHIP; |
| case ROLE_RELATION_SHIP_VALUE: return ROLE_RELATION_SHIP; |
| case TRANSACTION_VALUE: return TRANSACTION; |
| } |
| 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 PseudonymKind(int value, String name, String literal) { |
| this.value = value; |
| this.name = name; |
| this.literal = literal; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public int getValue() { |
| return value; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public String getName() { |
| return name; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| 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; |
| } |
| |
| } //PseudonymKind |