Package io.guise.framework.model
Class DefaultListSelectModel.ValueState
- java.lang.Object
-
- io.guise.framework.model.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 Summary
Constructors Constructor Description ValueState(V value)
ConstructorValueState(V value, DefaultListSelectModel.ValueState valueState)
State copy constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object object)
V
getValue()
int
hashCode()
boolean
isDisplayed()
boolean
isEnabled()
boolean
isSelected()
void
setDisplayed(boolean newDisplayed)
Sets whether this value is displayed.void
setEnabled(boolean newEnabled)
Sets whether this value is enabled.void
setSelected(boolean newSelected)
Sets whether this value is selected.
-
-
-
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 classjava.lang.Object
-
equals
public boolean equals(java.lang.Object object)
This implementation returns whether the the objects contain equal values.
- Overrides:
equals
in classjava.lang.Object
-
-