Class OrderedEnum

All Implemented Interfaces:
IDatatype, IDatatypeVisitable, IModelElement

public class OrderedEnum extends Enum
Enumerations allow the definition of sets of named values.
Author:
heiko beck, Holger Eichelberger
  • Field Details

    • DTYPE

      static final DelegatingType DTYPE
    • TYPE

      public static final IDatatype TYPE
      This constant represents the common type of all enums. Each specific enum type is assignable to this type.
    • GREATER

      public static final Operation GREATER
    • LESS

      public static final Operation LESS
    • GREATER_EQUALS

      public static final Operation GREATER_EQUALS
    • LESS_EQUALS

      public static final Operation LESS_EQUALS
    • MIN

      public static final Operation MIN
    • MAX

      public static final Operation MAX
  • Constructor Details

    • OrderedEnum

      private OrderedEnum()
      Creates the singleton instance for TYPE.
    • OrderedEnum

      public OrderedEnum(String name, ModelElement parent)
      Constructor for an empty enum.
      Parameters:
      name - Name of the enum
      parent - the object, in which this specific one is embedded
  • Method Details

    • isOrdered

      public boolean isOrdered()
      Returns whether this enum is ordered.
      Overrides:
      isOrdered in class Enum
      Returns:
      true if it is ordered, false else (default true)
    • accept

      public void accept(IModelVisitor visitor)
      Accept method for the visitor.
      Specified by:
      accept in interface IModelElement
      Overrides:
      accept in class Enum
      Parameters:
      visitor - The visitor, which should process this model element.
    • accept

      public void accept(IDatatypeVisitor visitor)
      Description copied from interface: IDatatypeVisitable
      Accepts a specialized visitor for creating a textual representation of the identity of this type.
      Specified by:
      accept in interface IDatatypeVisitable
      Overrides:
      accept in class Enum
      Parameters:
      visitor - the visitor to accept