All Packages Class Hierarchy This Package Previous Next Index
Class com.trumphurst.utils.TBooleanProperty
java.lang.Object
|
+----com.trumphurst.utils.TBooleanProperty
- public class TBooleanProperty
- extends Object
- implements TProperty
A TProperty which holds a boolean value
-
b
- The value
-
TBooleanProperty(boolean)
- Construct with a value
-
arguments()
- Return a String representation of the arguments necessary to construct the property.
-
construct(String)
- "Construct" the property from a String argument list.
-
fromString(String)
- Change the value of the property from a String representation of the new value.
-
get()
- Return the value
-
get(TProperties, String)
- Return the boolean value of the specified property in the properties list.
-
set(boolean)
-
Set the value
-
toString()
- Return a String representation of the value.
b
protected boolean b
- The value
TBooleanProperty
public TBooleanProperty(boolean b)
- Construct with a value
- Parameters:
- the - value
get
public boolean get()
- Return the value
get
public static boolean get(TProperties properties,
String key)
- Return the boolean value of the specified property in the properties list.
Verifies that the key exists, and refers to a TBooleanProperty (or a
subclass).
- Parameters:
- properties - the properties list
- Returns:
- the boolean value of the property, or false
set
public void set(boolean b) throws ValidationException
- Set the value
- Parameters:
- b - the value to set
- Throws: ValidationException
- never thrown by this class, but a
subclass that only permits a limited range of values might throw
the exception if the new value was out of range.
construct
public void construct(String arguments) throws ValidationException
- "Construct" the property from a String argument list.
The same as fromString, as there are no additional arguments other
than the value.
- Parameters:
- arguments - "true", "false", "yes", "no", "1" or "0"
- Throws: ValidationException
- if the argument is none of the above
fromString
public void fromString(String s) throws ValidationException
- Change the value of the property from a String representation of the new value.
- Parameters:
- arguments - "true", "false", "yes", "no", "1" or "0"
- Throws: ValidationException
- if the argument is none of the above
toString
public String toString()
- Return a String representation of the value.
- Returns:
- "true" or "false"
- Overrides:
- toString in class Object
arguments
public String arguments()
- Return a String representation of the arguments necessary to construct the property.
- Returns:
- "true" or "false"
All Packages Class Hierarchy This Package Previous Next Index