All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.trumphurst.utils.TRangeIntegerProperty

java.lang.Object
   |
   +----com.trumphurst.utils.TIntegerProperty
           |
           +----com.trumphurst.utils.TRangeIntegerProperty

public class TRangeIntegerProperty
extends TIntegerProperty
A TProperty which holds an int 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 TRangeIntegerProperty(int, int, int)
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(int)
Set the value

Variables

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

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

Constructors

 o TRangeIntegerProperty
 public TRangeIntegerProperty(int i,
                              int low,
                              int high) throws ValidationException
Construct with a value and range

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

Methods

 o set
 public void set(int i) throws ValidationException
Set the value

Parameters:
i - the value to set
Throws: ValidationException
if i < low or i > high
Overrides:
set in class TIntegerProperty
 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,2" representing "value,low,high"
Throws: ValidationException
if the arguments cannot be parsed, or the value is outside the specified range.
Overrides:
construct in class TIntegerProperty
 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,2" representing "value,low,high"
Overrides:
arguments in class TIntegerProperty

All Packages  Class Hierarchy  This Package  Previous  Next  Index