Class EnumLiteral
- java.lang.Object
-
- net.ssehub.easy.varModel.model.ModelElement
-
- net.ssehub.easy.varModel.model.datatypes.EnumLiteral
-
- All Implemented Interfaces:
IModelElement
public class EnumLiteral extends ModelElement
Objects represents the literal of an enum.- Author:
- heiko beck, Holger Eichelberger
-
-
Field Summary
Fields Modifier and Type Field Description private intordinalprivate IModelElementparent
-
Constructor Summary
Constructors Constructor Description EnumLiteral()Constructor for serialization.EnumLiteral(java.lang.String name, int ord, Enum parent)Constructor for the enum literal.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(IModelVisitor visitor)Accept method for the visitor.booleanequals(java.lang.Object object)intgetOrdinal()Returns the ordinal number of this literal.IModelElementgetParent()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 Detail
-
ordinal
private int ordinal
-
parent
private IModelElement parent
-
-
Constructor Detail
-
EnumLiteral
EnumLiteral()
Constructor for serialization.
-
EnumLiteral
public EnumLiteral(java.lang.String name, int ord, Enum parent)Constructor for the enum literal.- Parameters:
name- Name of the enum literalord- the ordinal number of this literalparent- the parent enum
-
-
Method Detail
-
getOrdinal
public int getOrdinal()
Returns the ordinal number of this literal.- Returns:
- the ordinal number
-
accept
public void accept(IModelVisitor visitor)
Description copied from interface:IModelElementAccept method for the visitor.- Parameters:
visitor- The visitor, which should process this model element.
-
getParent
public IModelElement 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
public boolean equals(java.lang.Object object)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-