blob: a9e0d0975f4edb9407a449488191eac197742ab7 [file] [log] [blame]
/**
* 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>Linkability</b></em>',
* and utility methods for working with them.
* <!-- end-user-doc -->
* @see org.eclipse.papyrus.pdp4eng.req.profile.pdp4engReqGDPR.pdp4engReqGDPRPackage#getLinkability()
* @model
* @generated
*/
public enum Linkability implements Enumerator {
/**
* The '<em><b>Single</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #SINGLE_VALUE
* @generated
* @ordered
*/
SINGLE(0, "Single", "Single"),
/**
* The '<em><b>Not Known</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #NOT_KNOWN_VALUE
* @generated
* @ordered
*/
NOT_KNOWN(1, "notKnown", "notKnown"),
/**
* The '<em><b>Subgroup</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #SUBGROUP_VALUE
* @generated
* @ordered
*/
SUBGROUP(2, "subgroup", "subgroup"),
/**
* The '<em><b>Anonymous</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #ANONYMOUS_VALUE
* @generated
* @ordered
*/
ANONYMOUS(3, "anonymous", "anonymous");
/**
* The '<em><b>Single</b></em>' literal value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #SINGLE
* @model name="Single"
* @generated
* @ordered
*/
public static final int SINGLE_VALUE = 0;
/**
* The '<em><b>Not Known</b></em>' literal value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #NOT_KNOWN
* @model name="notKnown"
* @generated
* @ordered
*/
public static final int NOT_KNOWN_VALUE = 1;
/**
* The '<em><b>Subgroup</b></em>' literal value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #SUBGROUP
* @model name="subgroup"
* @generated
* @ordered
*/
public static final int SUBGROUP_VALUE = 2;
/**
* The '<em><b>Anonymous</b></em>' literal value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #ANONYMOUS
* @model name="anonymous"
* @generated
* @ordered
*/
public static final int ANONYMOUS_VALUE = 3;
/**
* An array of all the '<em><b>Linkability</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static final Linkability[] VALUES_ARRAY =
new Linkability[] {
SINGLE,
NOT_KNOWN,
SUBGROUP,
ANONYMOUS,
};
/**
* A public read-only list of all the '<em><b>Linkability</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final List<Linkability> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the '<em><b>Linkability</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 Linkability get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
Linkability result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Linkability</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 Linkability getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
Linkability result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Linkability</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 Linkability get(int value) {
switch (value) {
case SINGLE_VALUE: return SINGLE;
case NOT_KNOWN_VALUE: return NOT_KNOWN;
case SUBGROUP_VALUE: return SUBGROUP;
case ANONYMOUS_VALUE: return ANONYMOUS;
}
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 Linkability(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;
}
} //Linkability