Package adams.core

Class ConfigurableEnumeration.AbstractItem<E extends ConfigurableEnumeration>

    • Field Detail

      • m_ID

        protected String m_ID
        the id.
      • m_Display

        protected String m_Display
        the (optional) display text.
    • Constructor Detail

      • AbstractItem

        public AbstractItem​(E enumeration,
                            String id,
                            String display)
        Initializes the enum type.
        Parameters:
        enumeration - the owning enumeration
        id - the ID of the enum type, can be null
        display - the display text, can be null
    • Method Detail

      • setEnumeration

        public void setEnumeration​(E value)
        Sets the owning enumeration.
        Parameters:
        value - the enumeration
      • getEnumeration

        public E getEnumeration()
        Returns the enumeration this item belongs to.
        Returns:
        the owner
      • getID

        public String getID()
        Returns the ID.
        Returns:
        the ID
      • getDisplay

        public String getDisplay()
        Returns the display text.
        Returns:
        the display text
      • equals

        public boolean equals​(Object obj)
        Checks if the provided item is the same as this one.
        Overrides:
        equals in class Object
        Parameters:
        obj - the object to check
        Returns:
        true if the same
        See Also:
        compareTo(AbstractItem)
      • toString

        public String toString()
        Just returns the display text.
        Overrides:
        toString in class Object
        Returns:
        the display text