Class EnumProperty


  • public final class EnumProperty
    extends Property
    Superclass for properties that wrap an enumeration value
    • Field Detail

      • value

        private final int value
      • text

        private final java.lang.String text
    • Constructor Detail

      • EnumProperty

        private EnumProperty​(int explicitValue,
                             java.lang.String text)
        Parameters:
        explicitValue - enumerated value to be set for this property
        text - the string value of the enum.
    • Method Detail

      • getInstance

        public static EnumProperty getInstance​(int explicitValue,
                                               java.lang.String text)
        Construct an enumeration property.
        Parameters:
        explicitValue - the value
        text - the text
        Returns:
        an enumeration property
      • getEnum

        public int getEnum()
        Description copied from class: Property
        This method expects to be overridden by subclasses
        Overrides:
        getEnum in class Property
        Returns:
        this.value
      • getObject

        public java.lang.Object getObject()
        Description copied from class: Property
        This method expects to be overridden by subclasses
        Overrides:
        getObject in class Property
        Returns:
        this.value cast as an Object
      • equals

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

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