public class DoubleGauge extends Object
| Constructor and Description |
|---|
DoubleGauge()
Class constructor for unlimited, uninitialized, noiseless gauge.
|
DoubleGauge(double value)
Class constructor for unlimited, noiseless gauge with initial value.
|
DoubleGauge(double value,
double minValue,
double maxValue)
Class constructor for limited, initialized, noiseless gauge.
|
DoubleGauge(double value,
double minValue,
double maxValue,
NoiseFunction noiseFunction)
Class Constructor for limited, initialized, noisy gauge.
|
DoubleGauge(double value,
NoiseFunction noiseFunction)
Class constructor for unlimited, initialized gauge with noise.
|
DoubleGauge(NoiseFunction noiseFunction)
Class constructor for unlimited, uninitialized gauge with noise.
|
| Modifier and Type | Method and Description |
|---|---|
double |
read()
Read the value of the gauge.
|
void |
record(double recValue)
Records a value to the gauge, with noise according to the
gauge's
NoiseFunction. |
public DoubleGauge()
public DoubleGauge(NoiseFunction noiseFunction)
noiseFunction - the noise function this gauge will apply to valuespublic DoubleGauge(double value)
value - the initial value of the gaugepublic DoubleGauge(double value,
NoiseFunction noiseFunction)
value - the initial value of the gaugenoiseFunction - the noise function this gauge will apply to valuespublic DoubleGauge(double value,
double minValue,
double maxValue)
value - the initial value of the gaugeminValue - the minimum value the gauge can store/readmaxValue - the maximum value the gauge can store/readpublic DoubleGauge(double value,
double minValue,
double maxValue,
NoiseFunction noiseFunction)
value - the initial value of the gaugeminValue - the minimum value the gauge can store/readmaxValue - the maximum value the gauge can store/readnoiseFunction - the noise function this gauge will apply to valuespublic double read()
public void record(double recValue)
NoiseFunction.recValue - the value to be written to the gaugeCopyright © 2013. All rights reserved.