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 Details

    • ordinal

      private int ordinal
    • parent

      private IModelElement parent
  • Constructor Details

    • EnumLiteral

      EnumLiteral()
      Constructor for serialization.
    • EnumLiteral

      public EnumLiteral(String name, int ord, Enum parent)
      Constructor for the enum literal.
      Parameters:
      name - Name of the enum literal
      ord - the ordinal number of this literal
      parent - the parent enum
  • Method Details

    • 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: IModelElement
      Accept method for the visitor.
      Parameters:
      visitor - The visitor, which should process this model element.
    • getParent

      public IModelElement getParent()
      Description copied from interface: IModelElement
      Returns the parent model element.
      Specified by:
      getParent in interface IModelElement
      Overrides:
      getParent in class ModelElement
      Returns:
      the parent model element (may be null)
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object