All Implemented Interfaces:
Serializable

public class EnumDef extends AttributeTypeDef
The EnumDef describes an open metadata enumeration. This enumeration consists of a list of valid values (stored in EnumElementDef objects) and a default value.
See Also:
  • Constructor Details

    • EnumDef

      public EnumDef()
      Default constructor sets up an empty EnumDef.
    • EnumDef

      public EnumDef(EnumDef template)
      Copy/clone constructor sets the EnumDef based on the values from the supplied template.
      Parameters:
      template - EnumDef
  • Method Details

    • cloneFromSubclass

      public AttributeTypeDef cloneFromSubclass()
      Delegate the process of cloning to the subclass.
      Specified by:
      cloneFromSubclass in class AttributeTypeDef
      Returns:
      subclass of AttributeTypeDef
    • getElementDefs

      public List<EnumElementDef> getElementDefs()
      Return the list of defined Enum values for this EnumDef.
      Returns:
      EnumElementDefs list
    • setElementDefs

      public void setElementDefs(List<EnumElementDef> elementDefs)
      Set up the list of defined Enum values for this EnumDef.
      Parameters:
      elementDefs - EnumElementDefs list
    • getDefaultValue

      public EnumElementDef getDefaultValue()
      Return the default value for the EnumDef.
      Returns:
      EnumElementDef representing the default value
    • setDefaultValue

      public void setDefaultValue(EnumElementDef defaultValue)
      Set up the default value for the EnumDef.
      Parameters:
      defaultValue - EnumElementDef representing the default value
    • toString

      public String toString()
      Standard toString method.
      Overrides:
      toString in class AttributeTypeDef
      Returns:
      JSON style description of variables.
    • equals

      public boolean equals(Object objectToCompare)
      Validate that an object is equal depending on their stored values.
      Overrides:
      equals in class AttributeTypeDef
      Parameters:
      objectToCompare - object
      Returns:
      boolean result
    • hashCode

      public int hashCode()
      Return a hash code based on the values of this object.
      Overrides:
      hashCode in class AttributeTypeDef
      Returns:
      in hash code