rvl.util
Class Param

java.lang.Object
  |
  +--rvl.util.Param
All Implemented Interfaces:
Value

public class Param
extends java.lang.Object
implements Value

Class for specifying numerical parameters


Field Summary
 boolean closedMax
           
 boolean closedMin
           
 java.lang.String label
           
 double max
           
 double min
           
 java.lang.String name
           
 double value
           
 
Constructor Summary
Param(java.lang.String nam, double val)
          Construct a Param object
Param(java.lang.String nam, double val, java.lang.String range)
          Construct a Param object
 
Method Summary
 java.lang.String getLabel()
           
 java.lang.String getName()
           
 boolean isValid(double val)
           
 void setLabel(java.lang.String l)
           
 void setValue(double v)
           
 double val()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

public java.lang.String name

label

public java.lang.String label

value

public double value

max

public double max

min

public double min

closedMin

public boolean closedMin

closedMax

public boolean closedMax
Constructor Detail

Param

public Param(java.lang.String nam,
             double val)
Construct a Param object
Parameters:
nam - name of parameter
val - starting value

Param

public Param(java.lang.String nam,
             double val,
             java.lang.String range)
Construct a Param object
Parameters:
nam - name of parameter
val - starting value
range - range specification: must begin with a "(" or "[", end with a ")" or "]", and there must be a "," in between. One number is allowed before the "," and one after, to specify a min and a max, respectively.
Examples: "[1,5)" specifies the interval [1,5), "(0,)" specifies that the parameter must be positive.
Method Detail

isValid

public boolean isValid(double val)
Specified by:
isValid in interface Value

val

public double val()
Specified by:
val in interface Value

setValue

public void setValue(double v)
Specified by:
setValue in interface Value

getName

public java.lang.String getName()
Specified by:
getName in interface Value

getLabel

public java.lang.String getLabel()
Specified by:
getLabel in interface Value

setLabel

public void setLabel(java.lang.String l)
Specified by:
setLabel in interface Value