/***************************************************************************** * Copyright (c) 2010 CEA LIST. * * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Chokri MRAIDHA (CEA LIST) chokri.mraidha@cea.fr - Initial API and implementation * *****************************************************************************/ package org.eclipse.papyrus.MARTE.MARTE_DesignModel.GCM; import java.util.Arrays; import java.util.Collections; import java.util.List; import org.eclipse.emf.common.util.Enumerator; /** * * A representation of the literals of the enumeration 'Port Specification Kind', * and utility methods for working with them. * * * @see org.eclipse.papyrus.MARTE.MARTE_DesignModel.GCM.GCMPackage#getPortSpecificationKind() * @model * @generated */ public enum PortSpecificationKind implements Enumerator { /** * The 'Atomic' literal object. * * * * @see #ATOMIC_VALUE * @generated * @ordered */ ATOMIC(0, "atomic", "atomic"), /** * The 'Interface Based' literal object. * * * * @see #INTERFACE_BASED_VALUE * @generated * @ordered */ INTERFACE_BASED(1, "interfaceBased", "interfaceBased"), /** * The 'Feature Based' literal object. * * * * @see #FEATURE_BASED_VALUE * @generated * @ordered */ FEATURE_BASED(2, "featureBased", "featureBased"); /** * The 'Atomic' literal value. * *

* If the meaning of 'Atomic' literal object isn't clear, there really should be more of a description here... *

* * * @see #ATOMIC * @model name="atomic" * @generated * @ordered */ public static final int ATOMIC_VALUE = 0; /** * The 'Interface Based' literal value. * *

* If the meaning of 'Interface Based' literal object isn't clear, there really should be more of a description here... *

* * * @see #INTERFACE_BASED * @model name="interfaceBased" * @generated * @ordered */ public static final int INTERFACE_BASED_VALUE = 1; /** * The 'Feature Based' literal value. * *

* If the meaning of 'Feature Based' literal object isn't clear, there really should be more of a description here... *

* * * @see #FEATURE_BASED * @model name="featureBased" * @generated * @ordered */ public static final int FEATURE_BASED_VALUE = 2; /** * An array of all the 'Port Specification Kind' enumerators. * * * * @generated */ private static final PortSpecificationKind[] VALUES_ARRAY = new PortSpecificationKind[] { ATOMIC, INTERFACE_BASED, FEATURE_BASED, }; /** * A public read-only list of all the 'Port Specification Kind' enumerators. * * * * @generated */ public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); /** * Returns the 'Port Specification Kind' literal with the specified literal value. * * * * @generated */ public static PortSpecificationKind get(String literal) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { PortSpecificationKind result = VALUES_ARRAY[i]; if (result.toString().equals(literal)) { return result; } } return null; } /** * Returns the 'Port Specification Kind' literal with the specified name. * * * * @generated */ public static PortSpecificationKind getByName(String name) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { PortSpecificationKind result = VALUES_ARRAY[i]; if (result.getName().equals(name)) { return result; } } return null; } /** * Returns the 'Port Specification Kind' literal with the specified integer value. * * * * @generated */ public static PortSpecificationKind get(int value) { switch (value) { case ATOMIC_VALUE: return ATOMIC; case INTERFACE_BASED_VALUE: return INTERFACE_BASED; case FEATURE_BASED_VALUE: return FEATURE_BASED; } return null; } /** * * * * @generated */ private final int value; /** * * * * @generated */ private final String name; /** * * * * @generated */ private final String literal; /** * Only this class can construct instances. * * * * @generated */ private PortSpecificationKind(int value, String name, String literal) { this.value = value; this.name = name; this.literal = literal; } /** * * * * @generated */ @Override public int getValue() { return value; } /** * * * * @generated */ @Override public String getName() { return name; } /** * * * * @generated */ @Override public String getLiteral() { return literal; } /** * Returns the literal value of the enumerator, which is its string representation. * * * * @generated */ @Override public String toString() { return literal; } } // PortSpecificationKind