All Implemented Interfaces:
Serializable

public class EnumPropertyValue extends InstancePropertyValue
An EnumPropertyValue stores the value for an enum property.
See Also:
  • Constructor Details

    • EnumPropertyValue

      public EnumPropertyValue()
      Default constructor initializes an empty enum value
    • EnumPropertyValue

      public EnumPropertyValue(EnumPropertyValue template)
      Copy/clone constructor initializes the enum with the values from the template.
      Parameters:
      template - EnumPropertyValue to copy
  • Method Details

    • cloneFromSubclass

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

      public String valueAsString()
      Return the string version of the value - used for error logging.
      Specified by:
      valueAsString in class InstancePropertyValue
      Returns:
      string value
    • valueAsObject

      public Object valueAsObject()
      Return the object version of the value - used for comparisons.
      Specified by:
      valueAsObject in class InstancePropertyValue
      Returns:
      object value
    • getOrdinal

      public int getOrdinal()
      Return the integer ordinal for this enum.
      Returns:
      int ordinal
    • setOrdinal

      public void setOrdinal(int ordinal)
      Set the integer ordinal for this enum.
      Parameters:
      ordinal - int
    • getSymbolicName

      public String getSymbolicName()
      Return the symbolic name for this enum value.
      Returns:
      String symbolic name
    • setSymbolicName

      public void setSymbolicName(String symbolicName)
      Set up the symbolic name for this enum value.
      Parameters:
      symbolicName - String symbolic name
    • getDescription

      public String getDescription()
      Return the description for this enum.
      Returns:
      String description
    • setDescription

      public void setDescription(String description)
      Set up the description for this enum.
      Parameters:
      description - String description
    • toString

      public String toString()
      Standard toString method.
      Overrides:
      toString in class InstancePropertyValue
      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 InstancePropertyValue
      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 InstancePropertyValue
      Returns:
      in hash code