
org.bimserver.models.ifc4.IfcSIPrefix Maven / Gradle / Ivy
Show all versions of pluginbase Show documentation
/**
* 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 SI Prefix',
* and utility methods for working with them.
*
* @see org.bimserver.models.ifc4.Ifc4Package#getIfcSIPrefix()
* @model
* @generated
*/
public enum IfcSIPrefix implements Enumerator {
/**
* The 'NULL' literal object.
*
*
* @see #NULL_VALUE
* @generated
* @ordered
*/
NULL(0, "NULL", "NULL"),
/**
* The 'DECA' literal object.
*
*
* @see #DECA_VALUE
* @generated
* @ordered
*/
DECA(1, "DECA", "DECA"),
/**
* The 'PICO' literal object.
*
*
* @see #PICO_VALUE
* @generated
* @ordered
*/
PICO(2, "PICO", "PICO"),
/**
* The 'KILO' literal object.
*
*
* @see #KILO_VALUE
* @generated
* @ordered
*/
KILO(3, "KILO", "KILO"),
/**
* The 'PETA' literal object.
*
*
* @see #PETA_VALUE
* @generated
* @ordered
*/
PETA(4, "PETA", "PETA"),
/**
* The 'TERA' literal object.
*
*
* @see #TERA_VALUE
* @generated
* @ordered
*/
TERA(5, "TERA", "TERA"),
/**
* The 'EXA' literal object.
*
*
* @see #EXA_VALUE
* @generated
* @ordered
*/
EXA(6, "EXA", "EXA"),
/**
* The 'NANO' literal object.
*
*
* @see #NANO_VALUE
* @generated
* @ordered
*/
NANO(7, "NANO", "NANO"),
/**
* The 'ATTO' literal object.
*
*
* @see #ATTO_VALUE
* @generated
* @ordered
*/
ATTO(8, "ATTO", "ATTO"),
/**
* The 'CENTI' literal object.
*
*
* @see #CENTI_VALUE
* @generated
* @ordered
*/
CENTI(9, "CENTI", "CENTI"),
/**
* The 'MILLI' literal object.
*
*
* @see #MILLI_VALUE
* @generated
* @ordered
*/
MILLI(10, "MILLI", "MILLI"),
/**
* The 'FEMTO' literal object.
*
*
* @see #FEMTO_VALUE
* @generated
* @ordered
*/
FEMTO(11, "FEMTO", "FEMTO"),
/**
* The 'MEGA' literal object.
*
*
* @see #MEGA_VALUE
* @generated
* @ordered
*/
MEGA(12, "MEGA", "MEGA"),
/**
* The 'HECTO' literal object.
*
*
* @see #HECTO_VALUE
* @generated
* @ordered
*/
HECTO(13, "HECTO", "HECTO"),
/**
* The 'DECI' literal object.
*
*
* @see #DECI_VALUE
* @generated
* @ordered
*/
DECI(14, "DECI", "DECI"),
/**
* The 'MICRO' literal object.
*
*
* @see #MICRO_VALUE
* @generated
* @ordered
*/
MICRO(15, "MICRO", "MICRO"),
/**
* The 'GIGA' literal object.
*
*
* @see #GIGA_VALUE
* @generated
* @ordered
*/
GIGA(16, "GIGA", "GIGA");
/**
* 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 'DECA' literal value.
*
*
* If the meaning of 'DECA' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #DECA
* @model
* @generated
* @ordered
*/
public static final int DECA_VALUE = 1;
/**
* The 'PICO' literal value.
*
*
* If the meaning of 'PICO' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #PICO
* @model
* @generated
* @ordered
*/
public static final int PICO_VALUE = 2;
/**
* The 'KILO' literal value.
*
*
* If the meaning of 'KILO' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #KILO
* @model
* @generated
* @ordered
*/
public static final int KILO_VALUE = 3;
/**
* The 'PETA' literal value.
*
*
* If the meaning of 'PETA' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #PETA
* @model
* @generated
* @ordered
*/
public static final int PETA_VALUE = 4;
/**
* The 'TERA' literal value.
*
*
* If the meaning of 'TERA' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #TERA
* @model
* @generated
* @ordered
*/
public static final int TERA_VALUE = 5;
/**
* The 'EXA' literal value.
*
*
* If the meaning of 'EXA' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #EXA
* @model
* @generated
* @ordered
*/
public static final int EXA_VALUE = 6;
/**
* The 'NANO' literal value.
*
*
* If the meaning of 'NANO' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #NANO
* @model
* @generated
* @ordered
*/
public static final int NANO_VALUE = 7;
/**
* The 'ATTO' literal value.
*
*
* If the meaning of 'ATTO' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #ATTO
* @model
* @generated
* @ordered
*/
public static final int ATTO_VALUE = 8;
/**
* The 'CENTI' literal value.
*
*
* If the meaning of 'CENTI' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #CENTI
* @model
* @generated
* @ordered
*/
public static final int CENTI_VALUE = 9;
/**
* The 'MILLI' literal value.
*
*
* If the meaning of 'MILLI' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #MILLI
* @model
* @generated
* @ordered
*/
public static final int MILLI_VALUE = 10;
/**
* The 'FEMTO' literal value.
*
*
* If the meaning of 'FEMTO' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #FEMTO
* @model
* @generated
* @ordered
*/
public static final int FEMTO_VALUE = 11;
/**
* The 'MEGA' literal value.
*
*
* If the meaning of 'MEGA' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #MEGA
* @model
* @generated
* @ordered
*/
public static final int MEGA_VALUE = 12;
/**
* The 'HECTO' literal value.
*
*
* If the meaning of 'HECTO' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #HECTO
* @model
* @generated
* @ordered
*/
public static final int HECTO_VALUE = 13;
/**
* The 'DECI' literal value.
*
*
* If the meaning of 'DECI' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #DECI
* @model
* @generated
* @ordered
*/
public static final int DECI_VALUE = 14;
/**
* The 'MICRO' literal value.
*
*
* If the meaning of 'MICRO' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #MICRO
* @model
* @generated
* @ordered
*/
public static final int MICRO_VALUE = 15;
/**
* The 'GIGA' literal value.
*
*
* If the meaning of 'GIGA' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #GIGA
* @model
* @generated
* @ordered
*/
public static final int GIGA_VALUE = 16;
/**
* An array of all the 'Ifc SI Prefix' enumerators.
*
*
* @generated
*/
private static final IfcSIPrefix[] VALUES_ARRAY = new IfcSIPrefix[] { NULL, DECA, PICO, KILO, PETA, TERA, EXA, NANO,
ATTO, CENTI, MILLI, FEMTO, MEGA, HECTO, DECI, MICRO, GIGA, };
/**
* A public read-only list of all the 'Ifc SI Prefix' enumerators.
*
*
* @generated
*/
public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the 'Ifc SI Prefix' literal with the specified literal value.
*
*
* @param literal the literal.
* @return the matching enumerator or null
.
* @generated
*/
public static IfcSIPrefix get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
IfcSIPrefix result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the 'Ifc SI Prefix' literal with the specified name.
*
*
* @param name the name.
* @return the matching enumerator or null
.
* @generated
*/
public static IfcSIPrefix getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
IfcSIPrefix result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the 'Ifc SI Prefix' literal with the specified integer value.
*
*
* @param value the integer value.
* @return the matching enumerator or null
.
* @generated
*/
public static IfcSIPrefix get(int value) {
switch (value) {
case NULL_VALUE:
return NULL;
case DECA_VALUE:
return DECA;
case PICO_VALUE:
return PICO;
case KILO_VALUE:
return KILO;
case PETA_VALUE:
return PETA;
case TERA_VALUE:
return TERA;
case EXA_VALUE:
return EXA;
case NANO_VALUE:
return NANO;
case ATTO_VALUE:
return ATTO;
case CENTI_VALUE:
return CENTI;
case MILLI_VALUE:
return MILLI;
case FEMTO_VALUE:
return FEMTO;
case MEGA_VALUE:
return MEGA;
case HECTO_VALUE:
return HECTO;
case DECI_VALUE:
return DECI;
case MICRO_VALUE:
return MICRO;
case GIGA_VALUE:
return GIGA;
}
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 IfcSIPrefix(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;
}
} //IfcSIPrefix