Class EnumLiteral
java.lang.Object
net.ssehub.easy.varModel.model.ModelElement
net.ssehub.easy.varModel.model.datatypes.EnumLiteral
- All Implemented Interfaces:
IModelElement
Objects represents the literal of an enum.
- Author:
- heiko beck, Holger Eichelberger
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for serialization.EnumLiteral(String name, int ord, Enum parent) Constructor for the enum literal. -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(IModelVisitor visitor) Accept method for the visitor.booleanintReturns the ordinal number of this literal.Returns the parent model element.inthashCode()Methods inherited from class net.ssehub.easy.varModel.model.ModelElement
findAttribute, getComment, getName, getNameSpace, getQualifiedName, getUniqueName, isTransparent, propagateAttribute, setComment, setName, toString
-
Field Details
-
ordinal
private int ordinal -
parent
-
-
Constructor Details
-
EnumLiteral
EnumLiteral()Constructor for serialization. -
EnumLiteral
Constructor for the enum literal.- Parameters:
name- Name of the enum literalord- the ordinal number of this literalparent- the parent enum
-
-
Method Details
-
getOrdinal
public int getOrdinal()Returns the ordinal number of this literal.- Returns:
- the ordinal number
-
accept
Description copied from interface:IModelElementAccept method for the visitor.- Parameters:
visitor- The visitor, which should process this model element.
-
getParent
Description copied from interface:IModelElementReturns the parent model element.- Specified by:
getParentin interfaceIModelElement- Overrides:
getParentin classModelElement- Returns:
- the parent model element (may be null)
-
equals
-
hashCode
public int hashCode()
-