Package org.ka2ddo.util
Class NamedBoolean
java.lang.Object
org.ka2ddo.util.NamedBoolean
This class provides an object wrapper around an accessor-controlled property
of type boolean.
- Author:
- Andrew Pavlin, KA2DDO
-
Constructor Summary
ModifierConstructorDescriptionprotected
NamedBoolean
(String name) Create a NamedBoolean object with the specified localized name.protected
NamedBoolean
(String name, Enum<?> theEnum) Create a NamedBoolean object with the specified localized name. -
Method Summary
Modifier and TypeMethodDescriptionEnum<?>
getEnum()
Returns the enumeration associated with this NamedBoolean (if any).abstract boolean
Report whether the wrapped property is set or not.abstract void
setSelected
(boolean newValue) Change the wrapped property's boolean value.toString()
Returns a string representation of the object.
-
Constructor Details
-
NamedBoolean
Create a NamedBoolean object with the specified localized name.- Parameters:
name
- String already-localized name to associate with the modifiable boolean value
-
NamedBoolean
Create a NamedBoolean object with the specified localized name.- Parameters:
name
- String already-localized name to associate with the modifiable boolean valuetheEnum
- Enum value to associate with the boolean
-
-
Method Details
-
toString
Returns a string representation of the object. In general, thetoString
method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. -
getEnum
Returns the enumeration associated with this NamedBoolean (if any).- Returns:
- Enum value, or null if no associated Enum
-
isSelected
public abstract boolean isSelected()Report whether the wrapped property is set or not.- Returns:
- the boolean value of the property
-
setSelected
public abstract void setSelected(boolean newValue) Change the wrapped property's boolean value.- Parameters:
newValue
- the new boolean value for the property
-