All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.trumphurst.utils.TStringProperty

java.lang.Object
   |
   +----com.trumphurst.utils.TStringProperty

public class TStringProperty
extends Object
implements TProperty
A TProperty which holds a String value


Variable Index

 o s
The value

Constructor Index

 o TStringProperty(String)
Construct with a value

Method Index

 o arguments()
Return a String representation of the arguments necessary to construct the property.
 o construct(String)
"Construct" the property from a String argument list.
 o fromString(String)
Change the value of the property from a String representation of the new value.
 o get()
Return the value
 o get(TProperties, String)
Return the String value of the specified property in the properties list.
 o set(String)
Set the value
 o toString()
Return a String representation of the value.

Variables

 o s
 protected String s
The value

Constructors

 o TStringProperty
 public TStringProperty(String s)
Construct with a value

Parameters:
s - the value

Methods

 o get
 public String get()
Return the value

 o get
 public static String get(TProperties properties,
                          String key)
Return the String value of the specified property in the properties list. Verifies that the key exists, and refers to a TStringProperty (or a subclass).

Parameters:
properties - the properties list
Returns:
the String value of the property, or null
 o set
 public void set(String s) throws ValidationException
Set the value

Parameters:
s - 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.
 o 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 - a string
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.
 o fromString
 public void fromString(String s) throws ValidationException
Change the value of the property from a String representation of the new value.

Parameters:
arguments - a string
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.
 o toString
 public String toString()
Return a String representation of the value.

Returns:
the String
Overrides:
toString in class Object
 o arguments
 public String arguments()
Return a String representation of the arguments necessary to construct the property.

Returns:
the String

All Packages  Class Hierarchy  This Package  Previous  Next  Index