
org.bimserver.models.ifc2x3tc1.IfcDocumentStatusEnum 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.ifc2x3tc1;
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 Document Status Enum',
* and utility methods for working with them.
*
* @see org.bimserver.models.ifc2x3tc1.Ifc2x3tc1Package#getIfcDocumentStatusEnum()
* @model
* @generated
*/
public enum IfcDocumentStatusEnum implements Enumerator {
/**
* The 'NULL' literal object.
*
*
* @see #NULL_VALUE
* @generated
* @ordered
*/
NULL(0, "NULL", "NULL"),
/**
* The 'REVISION' literal object.
*
*
* @see #REVISION_VALUE
* @generated
* @ordered
*/
REVISION(1, "REVISION", "REVISION"),
/**
* The 'NOTDEFINED' literal object.
*
*
* @see #NOTDEFINED_VALUE
* @generated
* @ordered
*/
NOTDEFINED(2, "NOTDEFINED", "NOTDEFINED"),
/**
* The 'DRAFT' literal object.
*
*
* @see #DRAFT_VALUE
* @generated
* @ordered
*/
DRAFT(3, "DRAFT", "DRAFT"),
/**
* The 'FINALDRAFT' literal object.
*
*
* @see #FINALDRAFT_VALUE
* @generated
* @ordered
*/
FINALDRAFT(4, "FINALDRAFT", "FINALDRAFT"),
/**
* The 'FINAL' literal object.
*
*
* @see #FINAL_VALUE
* @generated
* @ordered
*/
FINAL(5, "FINAL", "FINAL");
/**
* 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 'REVISION' literal value.
*
*
* If the meaning of 'REVISION' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #REVISION
* @model
* @generated
* @ordered
*/
public static final int REVISION_VALUE = 1;
/**
* 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 = 2;
/**
* The 'DRAFT' literal value.
*
*
* If the meaning of 'DRAFT' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #DRAFT
* @model
* @generated
* @ordered
*/
public static final int DRAFT_VALUE = 3;
/**
* The 'FINALDRAFT' literal value.
*
*
* If the meaning of 'FINALDRAFT' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #FINALDRAFT
* @model
* @generated
* @ordered
*/
public static final int FINALDRAFT_VALUE = 4;
/**
* The 'FINAL' literal value.
*
*
* If the meaning of 'FINAL' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #FINAL
* @model
* @generated
* @ordered
*/
public static final int FINAL_VALUE = 5;
/**
* An array of all the 'Ifc Document Status Enum' enumerators.
*
*
* @generated
*/
private static final IfcDocumentStatusEnum[] VALUES_ARRAY = new IfcDocumentStatusEnum[] { NULL, REVISION,
NOTDEFINED, DRAFT, FINALDRAFT, FINAL, };
/**
* A public read-only list of all the 'Ifc Document Status Enum' enumerators.
*
*
* @generated
*/
public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the 'Ifc Document Status Enum' literal with the specified literal value.
*
*
* @param literal the literal.
* @return the matching enumerator or null
.
* @generated
*/
public static IfcDocumentStatusEnum get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
IfcDocumentStatusEnum result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the 'Ifc Document Status Enum' literal with the specified name.
*
*
* @param name the name.
* @return the matching enumerator or null
.
* @generated
*/
public static IfcDocumentStatusEnum getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
IfcDocumentStatusEnum result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the 'Ifc Document Status Enum' literal with the specified integer value.
*
*
* @param value the integer value.
* @return the matching enumerator or null
.
* @generated
*/
public static IfcDocumentStatusEnum get(int value) {
switch (value) {
case NULL_VALUE:
return NULL;
case REVISION_VALUE:
return REVISION;
case NOTDEFINED_VALUE:
return NOTDEFINED;
case DRAFT_VALUE:
return DRAFT;
case FINALDRAFT_VALUE:
return FINALDRAFT;
case FINAL_VALUE:
return FINAL;
}
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 IfcDocumentStatusEnum(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;
}
} //IfcDocumentStatusEnum