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

org.contextmapper.dsl.contextMappingDSL.KnowledgeLevel Maven / Gradle / Ivy

/**
 * generated by Xtext 2.21.0
 */
package org.contextmapper.dsl.contextMappingDSL;

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 'Knowledge Level',
 * and utility methods for working with them.
 * 
 * @see org.contextmapper.dsl.contextMappingDSL.ContextMappingDSLPackage#getKnowledgeLevel()
 * @model
 * @generated
 */
public enum KnowledgeLevel implements Enumerator
{
  /**
   * The 'META' literal object.
   * 
   * 
   * @see #META_VALUE
   * @generated
   * @ordered
   */
  META(0, "META", "META"),

  /**
   * The 'CONCRETE' literal object.
   * 
   * 
   * @see #CONCRETE_VALUE
   * @generated
   * @ordered
   */
  CONCRETE(1, "CONCRETE", "CONCRETE");

  /**
   * The 'META' literal value.
   * 
   * 
   * @see #META
   * @model
   * @generated
   * @ordered
   */
  public static final int META_VALUE = 0;

  /**
   * The 'CONCRETE' literal value.
   * 
   * 
   * @see #CONCRETE
   * @model
   * @generated
   * @ordered
   */
  public static final int CONCRETE_VALUE = 1;

  /**
   * An array of all the 'Knowledge Level' enumerators.
   * 
   * 
   * @generated
   */
  private static final KnowledgeLevel[] VALUES_ARRAY =
    new KnowledgeLevel[]
    {
      META,
      CONCRETE,
    };

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

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

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

  /**
   * Returns the 'Knowledge Level' literal with the specified integer value.
   * 
   * 
   * @param value the integer value.
   * @return the matching enumerator or null.
   * @generated
   */
  public static KnowledgeLevel get(int value)
  {
    switch (value)
    {
      case META_VALUE: return META;
      case CONCRETE_VALUE: return CONCRETE;
    }
    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 KnowledgeLevel(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;
  }
  
} //KnowledgeLevel




© 2015 - 2024 Weber Informatics LLC | Privacy Policy