blob: d77d7743867331ff3758f21854654e400a0587d4 [file] [log] [blame]
/**
*/
package org.eclipse.emf.cdo.evolution;
import org.eclipse.emf.common.util.Enumerator;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
/**
* <!-- begin-user-doc -->
* A representation of the literals of the enumeration '<em><b>Change Kind</b></em>',
* and utility methods for working with them.
* <!-- end-user-doc -->
* @see org.eclipse.emf.cdo.evolution.EvolutionPackage#getChangeKind()
* @model
* @generated
*/
public enum ChangeKind implements Enumerator
{
/**
* The '<em><b>NONE</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #NONE_VALUE
* @generated
* @ordered
*/
NONE(0, "NONE", "NONE"),
/**
* The '<em><b>CHANGED</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #CHANGED_VALUE
* @generated
* @ordered
*/
CHANGED(1, "CHANGED", "CHANGED"),
/**
* The '<em><b>REMOVED</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #REMOVED_VALUE
* @generated
* @ordered
*/
REMOVED(2, "REMOVED", "REMOVED"),
/**
* The '<em><b>ADDED</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #ADDED_VALUE
* @generated
* @ordered
*/
ADDED(3, "ADDED", "ADDED"),
/**
* The '<em><b>COPIED</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #COPIED_VALUE
* @generated
* @ordered
*/
COPIED(4, "COPIED", "COPIED"),
/**
* The '<em><b>MOVED</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #MOVED_VALUE
* @generated
* @ordered
*/
MOVED(5, "MOVED", "MOVED");
/**
* The '<em><b>NONE</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>NONE</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #NONE
* @model
* @generated
* @ordered
*/
public static final int NONE_VALUE = 0;
/**
* The '<em><b>CHANGED</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>CHANGED</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #CHANGED
* @model
* @generated
* @ordered
*/
public static final int CHANGED_VALUE = 1;
/**
* The '<em><b>REMOVED</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>REMOVED</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #REMOVED
* @model
* @generated
* @ordered
*/
public static final int REMOVED_VALUE = 2;
/**
* The '<em><b>ADDED</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>ADDED</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #ADDED
* @model
* @generated
* @ordered
*/
public static final int ADDED_VALUE = 3;
/**
* The '<em><b>COPIED</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>COPIED</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #COPIED
* @model
* @generated
* @ordered
*/
public static final int COPIED_VALUE = 4;
/**
* The '<em><b>MOVED</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>MOVED</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #MOVED
* @model
* @generated
* @ordered
*/
public static final int MOVED_VALUE = 5;
/**
* An array of all the '<em><b>Change Kind</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static final ChangeKind[] VALUES_ARRAY = new ChangeKind[] { NONE, CHANGED, REMOVED, ADDED, COPIED, MOVED, };
/**
* A public read-only list of all the '<em><b>Change Kind</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final List<ChangeKind> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the '<em><b>Change Kind</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 ChangeKind get(String literal)
{
for (int i = 0; i < VALUES_ARRAY.length; ++i)
{
ChangeKind result = VALUES_ARRAY[i];
if (result.toString().equals(literal))
{
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Change Kind</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 ChangeKind getByName(String name)
{
for (int i = 0; i < VALUES_ARRAY.length; ++i)
{
ChangeKind result = VALUES_ARRAY[i];
if (result.getName().equals(name))
{
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Change Kind</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 ChangeKind get(int value)
{
switch (value)
{
case NONE_VALUE:
return NONE;
case CHANGED_VALUE:
return CHANGED;
case REMOVED_VALUE:
return REMOVED;
case ADDED_VALUE:
return ADDED;
case COPIED_VALUE:
return COPIED;
case MOVED_VALUE:
return MOVED;
}
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 ChangeKind(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;
}
} // ChangeKind