blob: b85aaa0e7ec4f76a89b05b6eec146f8c0e17f763 [file] [log] [blame]
/**
* Copyright (c) 2007 Oracle Corporation
*
* $Id: SECTION_TYPE.java,v 1.2 2007/12/12 16:43:21 gkessler Exp $
*/
package org.eclipse.jst.pagedesigner.editors.properties.quickedittabsections;
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>SECTION TYPE</b></em>',
* and utility methods for working with them.
* <!-- end-user-doc -->
* @see org.eclipse.jst.pagedesigner.editors.properties.quickedittabsections.QuickEditTabSectionsPackage#getSECTION_TYPE()
* @model
* @generated
*/
public enum SECTION_TYPE implements Enumerator {
/**
* The '<em><b>ATTRIBUTE</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #ATTRIBUTE_VALUE
* @generated
* @ordered
*/
ATTRIBUTE(0, "ATTRIBUTE", "ATTRIBUTE"),
/**
* The '<em><b>SECTION</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #SECTION_VALUE
* @generated
* @ordered
*/
SECTION(1, "SECTION", "SECTION");
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final String copyright = "Copyright (c) 2007 Oracle Corporation";
/**
* The '<em><b>ATTRIBUTE</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>ATTRIBUTE</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #ATTRIBUTE
* @model
* @generated
* @ordered
*/
public static final int ATTRIBUTE_VALUE = 0;
/**
* The '<em><b>SECTION</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>SECTION</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #SECTION
* @model
* @generated
* @ordered
*/
public static final int SECTION_VALUE = 1;
/**
* An array of all the '<em><b>SECTION TYPE</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static final SECTION_TYPE[] VALUES_ARRAY =
new SECTION_TYPE[] {
ATTRIBUTE,
SECTION,
};
/**
* A public read-only list of all the '<em><b>SECTION TYPE</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final List<SECTION_TYPE> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the '<em><b>SECTION TYPE</b></em>' literal with the specified literal value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param literal
* @return SECTION_TYPE
* @generated
*/
public static SECTION_TYPE get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
SECTION_TYPE result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>SECTION TYPE</b></em>' literal with the specified name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param name
* @return SECTION_TYPE
* @generated
*/
public static SECTION_TYPE getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
SECTION_TYPE result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>SECTION TYPE</b></em>' literal with the specified integer value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value
* @return SECTION_TYPE
* @generated
*/
public static SECTION_TYPE get(int value) {
switch (value) {
case ATTRIBUTE_VALUE: return ATTRIBUTE;
case SECTION_VALUE: return SECTION;
}
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 SECTION_TYPE(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;
}
} //SECTION_TYPE