All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.trumphurst.utils.TRangeDoubleProperty

java.lang.Object
   |
   +----com.trumphurst.utils.TDoubleProperty
           |
           +----com.trumphurst.utils.TRangeDoubleProperty

public class TRangeDoubleProperty
extends TDoubleProperty
A TProperty which holds a double value limited to a range


Variable Index

 o high
The highest permitted value in the range
 o low
The lowest permitted value in the range

Constructor Index

 o TRangeDoubleProperty(double, double, double)
Construct with a value and range

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 set(double)
Set the value

Variables

 o low
 protected double low
The lowest permitted value in the range

 o high
 protected double high
The highest permitted value in the range

Constructors

 o TRangeDoubleProperty
 public TRangeDoubleProperty(double d,
                             double low,
                             double high) throws ValidationException
Construct with a value and range

Parameters:
d - the value
low - the lowest permissible value
high - the highest permissible value
Throws: ValidationException
if d < low or d > high

Methods

 o set
 public void set(double d) throws ValidationException
Set the value

Parameters:
d - the value to set
Throws: ValidationException
if d < low or d > high
Overrides:
set in class TDoubleProperty
 o construct
 public void construct(String arguments) throws ValidationException
"Construct" the property from a String argument list.

Parameters:
arguments - a string of the form "1.0,0.0,2.0" representing "value,low,high"
Throws: ValidationException
if the arguments cannot be parsed, or the value is outside the specified range.
Overrides:
construct in class TDoubleProperty
 o arguments
 public String arguments()
Return a String representation of the arguments necessary to construct the property.

Returns:
a string of the form "1.0,0.0,2.0" representing "value,low,high"
Overrides:
arguments in class TDoubleProperty

All Packages  Class Hierarchy  This Package  Previous  Next  Index