org.bimserver.models.ifc4.IfcProtectiveDeviceTypeEnum Maven / Gradle / Ivy
/**
* Copyright (C) 2009-2014 BIMserver.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*/
package org.bimserver.models.ifc4;
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 'Ifc Protective Device Type Enum',
* and utility methods for working with them.
*
* @see org.bimserver.models.ifc4.Ifc4Package#getIfcProtectiveDeviceTypeEnum()
* @model
* @generated
*/
public enum IfcProtectiveDeviceTypeEnum implements Enumerator {
/**
* The 'NULL' literal object.
*
*
* @see #NULL_VALUE
* @generated
* @ordered
*/
NULL(0, "NULL", "NULL"),
/**
* The 'EARTHINGSWITCH' literal object.
*
*
* @see #EARTHINGSWITCH_VALUE
* @generated
* @ordered
*/
EARTHINGSWITCH(1, "EARTHINGSWITCH", "EARTHINGSWITCH"),
/**
* The 'RESIDUALCURRENTCIRCUITBREAKER' literal object.
*
*
* @see #RESIDUALCURRENTCIRCUITBREAKER_VALUE
* @generated
* @ordered
*/
RESIDUALCURRENTCIRCUITBREAKER(2, "RESIDUALCURRENTCIRCUITBREAKER", "RESIDUALCURRENTCIRCUITBREAKER"),
/**
* The 'NOTDEFINED' literal object.
*
*
* @see #NOTDEFINED_VALUE
* @generated
* @ordered
*/
NOTDEFINED(3, "NOTDEFINED", "NOTDEFINED"),
/**
* The 'EARTHLEAKAGECIRCUITBREAKER' literal object.
*
*
* @see #EARTHLEAKAGECIRCUITBREAKER_VALUE
* @generated
* @ordered
*/
EARTHLEAKAGECIRCUITBREAKER(4, "EARTHLEAKAGECIRCUITBREAKER", "EARTHLEAKAGECIRCUITBREAKER"),
/**
* The 'CIRCUITBREAKER' literal object.
*
*
* @see #CIRCUITBREAKER_VALUE
* @generated
* @ordered
*/
CIRCUITBREAKER(5, "CIRCUITBREAKER", "CIRCUITBREAKER"),
/**
* The 'VARISTOR' literal object.
*
*
* @see #VARISTOR_VALUE
* @generated
* @ordered
*/
VARISTOR(6, "VARISTOR", "VARISTOR"),
/**
* The 'USERDEFINED' literal object.
*
*
* @see #USERDEFINED_VALUE
* @generated
* @ordered
*/
USERDEFINED(7, "USERDEFINED", "USERDEFINED"),
/**
* The 'RESIDUALCURRENTSWITCH' literal object.
*
*
* @see #RESIDUALCURRENTSWITCH_VALUE
* @generated
* @ordered
*/
RESIDUALCURRENTSWITCH(8, "RESIDUALCURRENTSWITCH", "RESIDUALCURRENTSWITCH"),
/**
* The 'FUSEDISCONNECTOR' literal object.
*
*
* @see #FUSEDISCONNECTOR_VALUE
* @generated
* @ordered
*/
FUSEDISCONNECTOR(9, "FUSEDISCONNECTOR", "FUSEDISCONNECTOR");
/**
* The 'NULL' literal value.
*
*
* If the meaning of 'NULL' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #NULL
* @model
* @generated
* @ordered
*/
public static final int NULL_VALUE = 0;
/**
* The 'EARTHINGSWITCH' literal value.
*
*
* If the meaning of 'EARTHINGSWITCH' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #EARTHINGSWITCH
* @model
* @generated
* @ordered
*/
public static final int EARTHINGSWITCH_VALUE = 1;
/**
* The 'RESIDUALCURRENTCIRCUITBREAKER' literal value.
*
*
* If the meaning of 'RESIDUALCURRENTCIRCUITBREAKER' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #RESIDUALCURRENTCIRCUITBREAKER
* @model
* @generated
* @ordered
*/
public static final int RESIDUALCURRENTCIRCUITBREAKER_VALUE = 2;
/**
* The 'NOTDEFINED' literal value.
*
*
* If the meaning of 'NOTDEFINED' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #NOTDEFINED
* @model
* @generated
* @ordered
*/
public static final int NOTDEFINED_VALUE = 3;
/**
* The 'EARTHLEAKAGECIRCUITBREAKER' literal value.
*
*
* If the meaning of 'EARTHLEAKAGECIRCUITBREAKER' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #EARTHLEAKAGECIRCUITBREAKER
* @model
* @generated
* @ordered
*/
public static final int EARTHLEAKAGECIRCUITBREAKER_VALUE = 4;
/**
* The 'CIRCUITBREAKER' literal value.
*
*
* If the meaning of 'CIRCUITBREAKER' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #CIRCUITBREAKER
* @model
* @generated
* @ordered
*/
public static final int CIRCUITBREAKER_VALUE = 5;
/**
* The 'VARISTOR' literal value.
*
*
* If the meaning of 'VARISTOR' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #VARISTOR
* @model
* @generated
* @ordered
*/
public static final int VARISTOR_VALUE = 6;
/**
* The 'USERDEFINED' literal value.
*
*
* If the meaning of 'USERDEFINED' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #USERDEFINED
* @model
* @generated
* @ordered
*/
public static final int USERDEFINED_VALUE = 7;
/**
* The 'RESIDUALCURRENTSWITCH' literal value.
*
*
* If the meaning of 'RESIDUALCURRENTSWITCH' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #RESIDUALCURRENTSWITCH
* @model
* @generated
* @ordered
*/
public static final int RESIDUALCURRENTSWITCH_VALUE = 8;
/**
* The 'FUSEDISCONNECTOR' literal value.
*
*
* If the meaning of 'FUSEDISCONNECTOR' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #FUSEDISCONNECTOR
* @model
* @generated
* @ordered
*/
public static final int FUSEDISCONNECTOR_VALUE = 9;
/**
* An array of all the 'Ifc Protective Device Type Enum' enumerators.
*
*
* @generated
*/
private static final IfcProtectiveDeviceTypeEnum[] VALUES_ARRAY = new IfcProtectiveDeviceTypeEnum[] { NULL, EARTHINGSWITCH, RESIDUALCURRENTCIRCUITBREAKER, NOTDEFINED, EARTHLEAKAGECIRCUITBREAKER, CIRCUITBREAKER, VARISTOR, USERDEFINED,
RESIDUALCURRENTSWITCH, FUSEDISCONNECTOR, };
/**
* A public read-only list of all the 'Ifc Protective Device Type Enum' enumerators.
*
*
* @generated
*/
public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the 'Ifc Protective Device Type Enum' literal with the specified literal value.
*
*
* @param literal the literal.
* @return the matching enumerator or null
.
* @generated
*/
public static IfcProtectiveDeviceTypeEnum get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
IfcProtectiveDeviceTypeEnum result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the 'Ifc Protective Device Type Enum' literal with the specified name.
*
*
* @param name the name.
* @return the matching enumerator or null
.
* @generated
*/
public static IfcProtectiveDeviceTypeEnum getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
IfcProtectiveDeviceTypeEnum result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the 'Ifc Protective Device Type Enum' literal with the specified integer value.
*
*
* @param value the integer value.
* @return the matching enumerator or null
.
* @generated
*/
public static IfcProtectiveDeviceTypeEnum get(int value) {
switch (value) {
case NULL_VALUE:
return NULL;
case EARTHINGSWITCH_VALUE:
return EARTHINGSWITCH;
case RESIDUALCURRENTCIRCUITBREAKER_VALUE:
return RESIDUALCURRENTCIRCUITBREAKER;
case NOTDEFINED_VALUE:
return NOTDEFINED;
case EARTHLEAKAGECIRCUITBREAKER_VALUE:
return EARTHLEAKAGECIRCUITBREAKER;
case CIRCUITBREAKER_VALUE:
return CIRCUITBREAKER;
case VARISTOR_VALUE:
return VARISTOR;
case USERDEFINED_VALUE:
return USERDEFINED;
case RESIDUALCURRENTSWITCH_VALUE:
return RESIDUALCURRENTSWITCH;
case FUSEDISCONNECTOR_VALUE:
return FUSEDISCONNECTOR;
}
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 IfcProtectiveDeviceTypeEnum(int value, String name, String literal) {
this.value = value;
this.name = name;
this.literal = literal;
}
/**
*
*
* @generated
*/
public int getValue() {
return value;
}
/**
*
*
* @generated
*/
public String getName() {
return name;
}
/**
*
*
* @generated
*/
public String getLiteral() {
return literal;
}
/**
* Returns the literal value of the enumerator, which is its string representation.
*
*
* @generated
*/
@Override
public String toString() {
return literal;
}
} //IfcProtectiveDeviceTypeEnum