| /** |
| * ******************************************************************************* |
| * Copyright (c) 2017 Timing-Architects Embedded Systems GmbH and others. |
| * 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 |
| * |
| * Generated using Eclipse EMF |
| * |
| * ******************************************************************************* |
| */ |
| package org.eclipse.app4mc.amalthea.generator.configuration; |
| |
| 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>Process Mapping Algorithms</b></em>', |
| * and utility methods for working with them. |
| * <!-- end-user-doc --> |
| * @see org.eclipse.app4mc.amalthea.generator.configuration.RTMGCPackage#getProcessMappingAlgorithms() |
| * @model |
| * @generated |
| */ |
| public enum ProcessMappingAlgorithms implements Enumerator { |
| /** |
| * The '<em><b>WFD</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #WFD_VALUE |
| * @generated |
| * @ordered |
| */ |
| WFD(0, "WFD", "Worst Fit Decreasing"), |
| |
| /** |
| * The '<em><b>WFI</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #WFI_VALUE |
| * @generated |
| * @ordered |
| */ |
| WFI(1, "WFI", "Worst Fit Increasing"), |
| |
| /** |
| * The '<em><b>BFD</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #BFD_VALUE |
| * @generated |
| * @ordered |
| */ |
| BFD(2, "BFD", "Best Fit Decreasing"), |
| |
| /** |
| * The '<em><b>BFI</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #BFI_VALUE |
| * @generated |
| * @ordered |
| */ |
| BFI(3, "BFI", "Best Fit Increasing"); |
| |
| /** |
| * The '<em><b>WFD</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>WFD</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #WFD |
| * @model literal="Worst Fit Decreasing" |
| * @generated |
| * @ordered |
| */ |
| public static final int WFD_VALUE = 0; |
| |
| /** |
| * The '<em><b>WFI</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>WFI</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #WFI |
| * @model literal="Worst Fit Increasing" |
| * @generated |
| * @ordered |
| */ |
| public static final int WFI_VALUE = 1; |
| |
| /** |
| * The '<em><b>BFD</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>BFD</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #BFD |
| * @model literal="Best Fit Decreasing" |
| * @generated |
| * @ordered |
| */ |
| public static final int BFD_VALUE = 2; |
| |
| /** |
| * The '<em><b>BFI</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>BFI</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #BFI |
| * @model literal="Best Fit Increasing" |
| * @generated |
| * @ordered |
| */ |
| public static final int BFI_VALUE = 3; |
| |
| /** |
| * An array of all the '<em><b>Process Mapping Algorithms</b></em>' enumerators. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private static final ProcessMappingAlgorithms[] VALUES_ARRAY = |
| new ProcessMappingAlgorithms[] { |
| WFD, |
| WFI, |
| BFD, |
| BFI, |
| }; |
| |
| /** |
| * A public read-only list of all the '<em><b>Process Mapping Algorithms</b></em>' enumerators. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static final List<ProcessMappingAlgorithms> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); |
| |
| /** |
| * Returns the '<em><b>Process Mapping Algorithms</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 ProcessMappingAlgorithms get(String literal) { |
| for (int i = 0; i < VALUES_ARRAY.length; ++i) { |
| ProcessMappingAlgorithms result = VALUES_ARRAY[i]; |
| if (result.toString().equals(literal)) { |
| return result; |
| } |
| } |
| return null; |
| } |
| |
| /** |
| * Returns the '<em><b>Process Mapping Algorithms</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 ProcessMappingAlgorithms getByName(String name) { |
| for (int i = 0; i < VALUES_ARRAY.length; ++i) { |
| ProcessMappingAlgorithms result = VALUES_ARRAY[i]; |
| if (result.getName().equals(name)) { |
| return result; |
| } |
| } |
| return null; |
| } |
| |
| /** |
| * Returns the '<em><b>Process Mapping Algorithms</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 ProcessMappingAlgorithms get(int value) { |
| switch (value) { |
| case WFD_VALUE: return WFD; |
| case WFI_VALUE: return WFI; |
| case BFD_VALUE: return BFD; |
| case BFI_VALUE: return BFI; |
| } |
| 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 ProcessMappingAlgorithms(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; |
| } |
| |
| } //ProcessMappingAlgorithms |