/**
* <copyright>
* </copyright>
*
* $Id$
*/
package es.tid.cim;
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>Enum Address Origin</b></em>',
* and utility methods for working with them.
* <!-- end-user-doc -->
* @see es.tid.cim.CimPackage#getEnumAddressOrigin()
* @model
* @generated
*/
public enum EnumAddressOrigin 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>Other</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #OTHER_VALUE
* @generated
* @ordered
*/
OTHER(1, "Other", "Other"),
/**
* The '<em><b>Not Applicable</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #NOT_APPLICABLE_VALUE
* @generated
* @ordered
*/
NOT_APPLICABLE(1, "NotApplicable", "Not Applicable"),
/**
* The '<em><b>Static</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #STATIC_VALUE
* @generated
* @ordered
*/
STATIC(2, "Static", "Static"),
/**
* The '<em><b>DHCP</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #DHCP_VALUE
* @generated
* @ordered
*/
DHCP(3, "DHCP", "DHCP"),
/**
* The '<em><b>BOOTP</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #BOOTP_VALUE
* @generated
* @ordered
*/
BOOTP(4, "BOOTP", "BOOTP"),
/**
* The '<em><b>IPv4 Link Local</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #IPV4_LINK_LOCAL_VALUE
* @generated
* @ordered
*/
IPV4_LINK_LOCAL(5, "IPv4LinkLocal", "IPv4 Link Local");
/**
* 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"
* @generated
* @ordered
*/
public static final int UNKNOWN_VALUE = 0;
/**
* The '<em><b>Other</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Other</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #OTHER
* @model name="Other"
* @generated
* @ordered
*/
public static final int OTHER_VALUE = 1;
/**
* 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="NotApplicable" literal="Not Applicable"
* @generated
* @ordered
*/
public static final int NOT_APPLICABLE_VALUE = 1;
/**
* The '<em><b>Static</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Static</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #STATIC
* @model name="Static"
* @generated
* @ordered
*/
public static final int STATIC_VALUE = 2;
/**
* The '<em><b>DHCP</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>DHCP</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #DHCP
* @model
* @generated
* @ordered
*/
public static final int DHCP_VALUE = 3;
/**
* The '<em><b>BOOTP</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>BOOTP</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #BOOTP
* @model
* @generated
* @ordered
*/
public static final int BOOTP_VALUE = 4;
/**
* The '<em><b>IPv4 Link Local</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>IPv4 Link Local</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #IPV4_LINK_LOCAL
* @model name="IPv4LinkLocal" literal="IPv4 Link Local"
* @generated
* @ordered
*/
public static final int IPV4_LINK_LOCAL_VALUE = 5;
/**
* An array of all the '<em><b>Enum Address Origin</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static final EnumAddressOrigin[] VALUES_ARRAY =
new EnumAddressOrigin[] {
UNKNOWN,
OTHER,
NOT_APPLICABLE,
STATIC,
DHCP,
BOOTP,
IPV4_LINK_LOCAL,
};
/**
* A public read-only list of all the '<em><b>Enum Address Origin</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final List<EnumAddressOrigin> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the '<em><b>Enum Address Origin</b></em>' literal with the specified literal value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static EnumAddressOrigin get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
EnumAddressOrigin result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Enum Address Origin</b></em>' literal with the specified name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static EnumAddressOrigin getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
EnumAddressOrigin result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Enum Address Origin</b></em>' literal with the specified integer value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static EnumAddressOrigin get(int value) {
switch (value) {
case UNKNOWN_VALUE: return UNKNOWN;
case OTHER_VALUE: return OTHER;
case STATIC_VALUE: return STATIC;
case DHCP_VALUE: return DHCP;
case BOOTP_VALUE: return BOOTP;
case IPV4_LINK_LOCAL_VALUE: return IPV4_LINK_LOCAL;
}
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 EnumAddressOrigin(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;
}
} //EnumAddressOrigin