/**
* CertWare Project
* Copyright (c) 2010 National Aeronautics and Space Administration. All rights reserved.
*/
package net.certware.verification.checklist;
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 literals of the enumeration '<em><b>Choices</b></em>',
* and utility methods for working with them.
* <!-- end-user-doc -->
* @see net.certware.verification.checklist.ChecklistPackage#getChoices()
* @model
* @generated
*/
public enum Choices implements Enumerator {
/**
* The '<em><b>Unknown</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #UNKNOWN_VALUE
* @generated
* @ordered
*/
UNKNOWN(0, "unknown", "UNKNOWN"), /**
* The '<em><b>No</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #NO_VALUE
* @generated
* @ordered
*/
NO(1, "no", "NO"), //$NON-NLS-1$ //$NON-NLS-2$
/**
* The '<em><b>Yes</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #YES_VALUE
* @generated
* @ordered
*/
YES(2, "yes", "YES"), //$NON-NLS-1$ //$NON-NLS-2$
/**
* The '<em><b>Not applicable</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #NOT_APPLICABLE_VALUE
* @generated
* @ordered
*/
NOT_APPLICABLE(3, "not_applicable", "NA"); //$NON-NLS-1$ //$NON-NLS-2$
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final String copyright = "Copyright (c) 2010 National Aeronautics and Space Administration"; //$NON-NLS-1$
/**
* The '<em><b>Unknown</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Unknown</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #UNKNOWN
* @model name="unknown" literal="UNKNOWN"
* @generated
* @ordered
*/
public static final int UNKNOWN_VALUE = 0;
/**
* The '<em><b>No</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>No</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #NO
* @model name="no" literal="NO"
* @generated
* @ordered
*/
public static final int NO_VALUE = 1;
/**
* The '<em><b>Yes</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Yes</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #YES
* @model name="yes" literal="YES"
* @generated
* @ordered
*/
public static final int YES_VALUE = 2;
/**
* The '<em><b>Not applicable</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Not applicable</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #NOT_APPLICABLE
* @model name="not_applicable" literal="NA"
* @generated
* @ordered
*/
public static final int NOT_APPLICABLE_VALUE = 3;
/**
* An array of all the '<em><b>Choices</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static final Choices[] VALUES_ARRAY =
new Choices[] {
UNKNOWN,
NO,
YES,
NOT_APPLICABLE,
};
/**
* A public read-only list of all the '<em><b>Choices</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final List<Choices> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the '<em><b>Choices</b></em>' literal with the specified literal value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static Choices get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
Choices result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Choices</b></em>' literal with the specified name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static Choices getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
Choices result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Choices</b></em>' literal with the specified integer value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static Choices get(int value) {
switch (value) {
case UNKNOWN_VALUE: return UNKNOWN;
case NO_VALUE: return NO;
case YES_VALUE: return YES;
case NOT_APPLICABLE_VALUE: return NOT_APPLICABLE;
}
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 Choices(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;
}
} //Choices