| /** |
| * Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany) |
| * 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: |
| * Florian Pirchner - Initial implementation |
| */ |
| package org.eclipse.osbp.ecview.core.common.model.visibility; |
| |
| 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 model object '<em><b>YColor</b></em>'. |
| * <!-- end-user-doc --> |
| * @see org.eclipse.osbp.ecview.core.common.model.visibility.VisibilityPackage#getYColor() |
| * @model |
| * @generated |
| */ |
| public enum YColor implements Enumerator |
| { |
| /** |
| * The '<em><b>UNDEFINED</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #UNDEFINED_VALUE |
| * @generated |
| * @ordered |
| */ |
| UNDEFINED(0, "UNDEFINED", "UNDEFINED"), |
| /** |
| * The '<em><b>GREEN</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #GREEN_VALUE |
| * @generated |
| * @ordered |
| */ |
| GREEN(1, "GREEN", "green"), |
| /** |
| * The '<em><b>BLUE</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #BLUE_VALUE |
| * @generated |
| * @ordered |
| */ |
| BLUE(2, "BLUE", "blue"), |
| /** |
| * The '<em><b>YELLOW</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #YELLOW_VALUE |
| * @generated |
| * @ordered |
| */ |
| YELLOW(3, "YELLOW", "yellow"), |
| /** |
| * The '<em><b>RED</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #RED_VALUE |
| * @generated |
| * @ordered |
| */ |
| RED(4, "RED", "red"), |
| /** |
| * The '<em><b>BLACK</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #BLACK_VALUE |
| * @generated |
| * @ordered |
| */ |
| BLACK(5, "BLACK", "black"), |
| /** |
| * The '<em><b>WHITE</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #WHITE_VALUE |
| * @generated |
| * @ordered |
| */ |
| WHITE(6, "WHITE", "white"), |
| /** |
| * The '<em><b>GRAY</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #GRAY_VALUE |
| * @generated |
| * @ordered |
| */ |
| GRAY(7, "GRAY", "gray"), |
| /** |
| * The '<em><b>LIGHT GRAY</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #LIGHT_GRAY_VALUE |
| * @generated |
| * @ordered |
| */ |
| LIGHT_GRAY(8, "LIGHT_GRAY", "light-gray"), /** |
| * The '<em><b>DARK GRAY</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #DARK_GRAY_VALUE |
| * @generated |
| * @ordered |
| */ |
| DARK_GRAY(9, "DARK_GRAY", "dark-gray"); |
| /** |
| * The '<em><b>UNDEFINED</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>UNDEFINED</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * |
| * <!-- end-user-doc --> |
| * @see #UNDEFINED |
| * @model |
| * @generated |
| * @ordered |
| */ |
| public static final int UNDEFINED_VALUE = 0; |
| |
| /** |
| * The '<em><b>GREEN</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>GREEN</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * |
| * <!-- end-user-doc --> |
| * @see #GREEN |
| * @model literal="green" |
| * @generated |
| * @ordered |
| */ |
| public static final int GREEN_VALUE = 1; |
| |
| /** |
| * The '<em><b>BLUE</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>BLUE</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * |
| * <!-- end-user-doc --> |
| * @see #BLUE |
| * @model literal="blue" |
| * @generated |
| * @ordered |
| */ |
| public static final int BLUE_VALUE = 2; |
| |
| /** |
| * The '<em><b>YELLOW</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>YELLOW</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * |
| * <!-- end-user-doc --> |
| * @see #YELLOW |
| * @model literal="yellow" |
| * @generated |
| * @ordered |
| */ |
| public static final int YELLOW_VALUE = 3; |
| |
| /** |
| * The '<em><b>RED</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>RED</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * |
| * <!-- end-user-doc --> |
| * @see #RED |
| * @model literal="red" |
| * @generated |
| * @ordered |
| */ |
| public static final int RED_VALUE = 4; |
| |
| /** |
| * The '<em><b>BLACK</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>BLACK</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * |
| * <!-- end-user-doc --> |
| * @see #BLACK |
| * @model literal="black" |
| * @generated |
| * @ordered |
| */ |
| public static final int BLACK_VALUE = 5; |
| |
| /** |
| * The '<em><b>WHITE</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>WHITE</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * |
| * <!-- end-user-doc --> |
| * @see #WHITE |
| * @model literal="white" |
| * @generated |
| * @ordered |
| */ |
| public static final int WHITE_VALUE = 6; |
| |
| /** |
| * The '<em><b>GRAY</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>GRAY</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * |
| * <!-- end-user-doc --> |
| * @see #GRAY |
| * @model literal="gray" |
| * @generated |
| * @ordered |
| */ |
| public static final int GRAY_VALUE = 7; |
| |
| /** |
| * The '<em><b>LIGHT GRAY</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>LIGHT GRAY</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * |
| * <!-- end-user-doc --> |
| * @see #LIGHT_GRAY |
| * @model literal="light-gray" |
| * @generated |
| * @ordered |
| */ |
| public static final int LIGHT_GRAY_VALUE = 8; |
| |
| /** |
| * The '<em><b>DARK GRAY</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>DARK GRAY</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * |
| * <!-- end-user-doc --> |
| * @see #DARK_GRAY |
| * @model literal="dark-gray" |
| * @generated |
| * @ordered |
| */ |
| public static final int DARK_GRAY_VALUE = 9; |
| |
| /** |
| * An array of all the '<em><b>YColor</b></em>' enumerators. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private static final YColor[] VALUES_ARRAY = |
| new YColor[] { |
| UNDEFINED, |
| GREEN, |
| BLUE, |
| YELLOW, |
| RED, |
| BLACK, |
| WHITE, |
| GRAY, |
| LIGHT_GRAY, |
| DARK_GRAY, |
| }; |
| |
| /** |
| * A public read-only list of all the '<em><b>YColor</b></em>' enumerators. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static final List<YColor> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); |
| |
| /** |
| * Returns the '<em><b>YColor</b></em>' literal with the specified literal value. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static YColor get(String literal) { |
| for (int i = 0; i < VALUES_ARRAY.length; ++i) { |
| YColor result = VALUES_ARRAY[i]; |
| if (result.toString().equals(literal)) { |
| return result; |
| } |
| } |
| return null; |
| } |
| |
| /** |
| * Returns the '<em><b>YColor</b></em>' literal with the specified name. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static YColor getByName(String name) { |
| for (int i = 0; i < VALUES_ARRAY.length; ++i) { |
| YColor result = VALUES_ARRAY[i]; |
| if (result.getName().equals(name)) { |
| return result; |
| } |
| } |
| return null; |
| } |
| |
| /** |
| * Returns the '<em><b>YColor</b></em>' literal with the specified integer value. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static YColor get(int value) { |
| switch (value) { |
| case UNDEFINED_VALUE: return UNDEFINED; |
| case GREEN_VALUE: return GREEN; |
| case BLUE_VALUE: return BLUE; |
| case YELLOW_VALUE: return YELLOW; |
| case RED_VALUE: return RED; |
| case BLACK_VALUE: return BLACK; |
| case WHITE_VALUE: return WHITE; |
| case GRAY_VALUE: return GRAY; |
| case LIGHT_GRAY_VALUE: return LIGHT_GRAY; |
| case DARK_GRAY_VALUE: return DARK_GRAY; |
| } |
| 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 YColor(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; |
| } |
| } |