qflib 0.98.0

de.qfs.lib.option
Class BooleanOption

java.lang.Object
  |
  +--java.util.Observable
        |
        +--de.qfs.lib.option.Option
              |
              +--de.qfs.lib.option.BooleanOption
All Implemented Interfaces:
java.lang.Cloneable, ConfigurableOption, java.io.Serializable

public class BooleanOption
extends Option
implements ConfigurableOption

A BooleanOption's value is of class Boolean. The value must not be null, since the swing JCheckBox used to edit a BooleanOption does not support the concept of neither true nor false.

Version:
$Revision: 1.8 $
Author:
Gregor Schmid
See Also:
Serialized Form

Constructor Summary
BooleanOption()
          Create a new BooleanOption.
BooleanOption(java.lang.String name, boolean value)
          Create a new BooleanOption.
 
Method Summary
 boolean equals(java.lang.Object object)
          Two BooleanOptions are considered equal if their names and values are equal.
 java.lang.String getConfigurableValue()
          Get the Option's value as a String.
 void setConfigurableValue(java.lang.String val)
          Set the Option's value from a String.
 void setNullOK(boolean nullOK)
          Override setNullOK, since a null value is illegal for a BooleanOption.
 
Methods inherited from class de.qfs.lib.option.Option
addResources, addValidator, checkValue, clone, getName, getResources, getValue, hashCode, isNullOK, removeValidator, setName, setResources, setValue, toString
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BooleanOption

public BooleanOption()
Create a new BooleanOption.

BooleanOption

public BooleanOption(java.lang.String name,
                     boolean value)
Create a new BooleanOption.
Parameters:
name - The name of the BooleanOption.
value - The initial value.
Method Detail

setNullOK

public void setNullOK(boolean nullOK)
Override setNullOK, since a null value is illegal for a BooleanOption.
Overrides:
setNullOK in class Option
Parameters:
nullOK - Ignored.

equals

public boolean equals(java.lang.Object object)
Two BooleanOptions are considered equal if their names and values are equal.
Overrides:
equals in class Option
Parameters:
object - The object to compare to.
Returns:
True if objects are equal

getConfigurableValue

public java.lang.String getConfigurableValue()
Get the Option's value as a String.
Specified by:
getConfigurableValue in interface ConfigurableOption
Returns:
The Option's value as a String.

setConfigurableValue

public void setConfigurableValue(java.lang.String val)
Set the Option's value from a String.
Specified by:
setConfigurableValue in interface ConfigurableOption
Parameters:
val - The value to set.

qflib 0.98.0