Class EnumLiteral

  • All Implemented Interfaces:
    IModelElement

    public class EnumLiteral
    extends ModelElement
    Objects represents the literal of an enum.
    Author:
    heiko beck, Holger Eichelberger
    • Field Detail

      • ordinal

        private int ordinal
    • 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 literal
        ord - the ordinal number of this literal
        parent - 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: IModelElement
        Accept method for the visitor.
        Parameters:
        visitor - The visitor, which should process this model element.
      • equals

        public boolean equals​(java.lang.Object object)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object