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

org.contextmapper.dsl.contextMappingDSL.LikelihoodForChange 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 'Likelihood For Change',
 * and utility methods for working with them.
 * 
 * @see org.contextmapper.dsl.contextMappingDSL.ContextMappingDSLPackage#getLikelihoodForChange()
 * @model
 * @generated
 */
public enum LikelihoodForChange implements Enumerator
{
  /**
   * The 'NORMAL' literal object.
   * 
   * 
   * @see #NORMAL_VALUE
   * @generated
   * @ordered
   */
  NORMAL(0, "NORMAL", "NORMAL"),

  /**
   * The 'RARELY' literal object.
   * 
   * 
   * @see #RARELY_VALUE
   * @generated
   * @ordered
   */
  RARELY(1, "RARELY", "RARELY"),

  /**
   * The 'OFTEN' literal object.
   * 
   * 
   * @see #OFTEN_VALUE
   * @generated
   * @ordered
   */
  OFTEN(2, "OFTEN", "OFTEN");

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

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

  /**
   * The 'OFTEN' literal value.
   * 
   * 
   * @see #OFTEN
   * @model
   * @generated
   * @ordered
   */
  public static final int OFTEN_VALUE = 2;

  /**
   * An array of all the 'Likelihood For Change' enumerators.
   * 
   * 
   * @generated
   */
  private static final LikelihoodForChange[] VALUES_ARRAY =
    new LikelihoodForChange[]
    {
      NORMAL,
      RARELY,
      OFTEN,
    };

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

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

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

  /**
   * Returns the 'Likelihood For Change' literal with the specified integer value.
   * 
   * 
   * @param value the integer value.
   * @return the matching enumerator or null.
   * @generated
   */
  public static LikelihoodForChange get(int value)
  {
    switch (value)
    {
      case NORMAL_VALUE: return NORMAL;
      case RARELY_VALUE: return RARELY;
      case OFTEN_VALUE: return OFTEN;
    }
    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 LikelihoodForChange(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;
  }
  
} //LikelihoodForChange




© 2015 - 2024 Weber Informatics LLC | Privacy Policy