Class DefaultListSelectModel.ValueState

  • Enclosing class:
    DefaultListSelectModel<V>

    protected class DefaultListSelectModel.ValueState
    extends java.lang.Object
    An encapsulation of the state of a value in the model. Value states are considered equal if the value they contain are equal.
    Author:
    Garret Wilson
    • Constructor Detail

      • ValueState

        public ValueState​(V value)
        Constructor
        Parameters:
        value - The model value.
      • ValueState

        public ValueState​(V value,
                          DefaultListSelectModel.ValueState valueState)
        State copy constructor
        Parameters:
        value - The new model value.
        valueState - The existing state containing values to copy.
    • Method Detail

      • getValue

        public V getValue()
        Returns:
        The model value.
      • isDisplayed

        public boolean isDisplayed()
        Returns:
        Whether this value is displayed.
      • setDisplayed

        public void setDisplayed​(boolean newDisplayed)
        Sets whether this value is displayed.
        Parameters:
        newDisplayed - true if this value should be displayed.
      • isEnabled

        public boolean isEnabled()
        Returns:
        Whether this value is enabled.
      • setEnabled

        public void setEnabled​(boolean newEnabled)
        Sets whether this value is enabled.
        Parameters:
        newEnabled - true if this value should be enabled.
      • isSelected

        public boolean isSelected()
        Returns:
        Whether this value is selected.
      • setSelected

        public void setSelected​(boolean newSelected)
        Sets whether this value is selected.
        Parameters:
        newSelected - true if this value should be selected.
      • hashCode

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

        public boolean equals​(java.lang.Object object)

        This implementation returns whether the the objects contain equal values.

        Overrides:
        equals in class java.lang.Object