Class DefaultListSelectModel.ValueState

java.lang.Object
io.guise.framework.model.DefaultListSelectModel.ValueState
Enclosing class:
DefaultListSelectModel<V>

protected class DefaultListSelectModel.ValueState extends 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 Details

    • ValueState

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

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

    • 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 Object
    • equals

      public boolean equals(Object object)

      This implementation returns whether the the objects contain equal values.

      Overrides:
      equals in class Object