Package io.guise.framework.model
Class DefaultListSelectModel.ValueState
java.lang.Object
io.guise.framework.model.DefaultListSelectModel.ValueState
- Enclosing class:
- DefaultListSelectModel<V>
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
ConstructorDescriptionValueState
(V value) ConstructorValueState
(V value, DefaultListSelectModel<V>.ValueState valueState) State copy constructor -
Method Summary
Modifier and TypeMethodDescriptionboolean
getValue()
int
hashCode()
boolean
boolean
boolean
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 Details
-
ValueState
Constructor- Parameters:
value
- The model value.
-
ValueState
State copy constructor- Parameters:
value
- The new model value.valueState
- The existing state containing values to copy.
-
-
Method Details
-
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() -
equals
This implementation returns whether the the objects contain equal values.
-