All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.nasdanika.models.echarts.graph.FontStyle Maven / Gradle / Ivy

The newest version!
/**
 */
package org.nasdanika.models.echarts.graph;

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 'Font Style',
 * and utility methods for working with them.
 * 
 * @see org.nasdanika.models.echarts.graph.GraphPackage#getFontStyle()
 * @model
 * @generated
 */
public enum FontStyle implements Enumerator {
	/**
	 * The 'NORMAL' literal object.
	 * 
	 * 
	 * @see #NORMAL_VALUE
	 * @generated
	 * @ordered
	 */
	NORMAL(0, "NORMAL", "normal"),

	/**
	 * The 'ITALIC' literal object.
	 * 
	 * 
	 * @see #ITALIC_VALUE
	 * @generated
	 * @ordered
	 */
	ITALIC(1, "ITALIC", "italic"),

	/**
	 * The 'OBLIQUE' literal object.
	 * 
	 * 
	 * @see #OBLIQUE_VALUE
	 * @generated
	 * @ordered
	 */
	OBLIQUE(2, "OBLIQUE", "oblique");

	/**
	 * The 'NORMAL' literal value.
	 * 
	 * 
	 * @see #NORMAL
	 * @model literal="normal"
	 * @generated
	 * @ordered
	 */
	public static final int NORMAL_VALUE = 0;

	/**
	 * The 'ITALIC' literal value.
	 * 
	 * 
	 * @see #ITALIC
	 * @model literal="italic"
	 * @generated
	 * @ordered
	 */
	public static final int ITALIC_VALUE = 1;

	/**
	 * The 'OBLIQUE' literal value.
	 * 
	 * 
	 * @see #OBLIQUE
	 * @model literal="oblique"
	 * @generated
	 * @ordered
	 */
	public static final int OBLIQUE_VALUE = 2;

	/**
	 * An array of all the 'Font Style' enumerators.
	 * 
	 * 
	 * @generated
	 */
	private static final FontStyle[] VALUES_ARRAY =
		new FontStyle[] {
			NORMAL,
			ITALIC,
			OBLIQUE,
		};

	/**
	 * A public read-only list of all the 'Font Style' enumerators.
	 * 
	 * 
	 * @generated
	 */
	public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));

	/**
	 * Returns the 'Font Style' literal with the specified literal value.
	 * 
	 * 
	 * @param literal the literal.
	 * @return the matching enumerator or null.
	 * @generated
	 */
	public static FontStyle get(String literal) {
		for (int i = 0; i < VALUES_ARRAY.length; ++i) {
			FontStyle result = VALUES_ARRAY[i];
			if (result.toString().equals(literal)) {
				return result;
			}
		}
		return null;
	}

	/**
	 * Returns the 'Font Style' literal with the specified name.
	 * 
	 * 
	 * @param name the name.
	 * @return the matching enumerator or null.
	 * @generated
	 */
	public static FontStyle getByName(String name) {
		for (int i = 0; i < VALUES_ARRAY.length; ++i) {
			FontStyle result = VALUES_ARRAY[i];
			if (result.getName().equals(name)) {
				return result;
			}
		}
		return null;
	}

	/**
	 * Returns the 'Font Style' literal with the specified integer value.
	 * 
	 * 
	 * @param value the integer value.
	 * @return the matching enumerator or null.
	 * @generated
	 */
	public static FontStyle get(int value) {
		switch (value) {
			case NORMAL_VALUE: return NORMAL;
			case ITALIC_VALUE: return ITALIC;
			case OBLIQUE_VALUE: return OBLIQUE;
		}
		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 FontStyle(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;
	}
	
} //FontStyle




© 2015 - 2024 Weber Informatics LLC | Privacy Policy