public final class Threshold extends Object implements IsThreshold
Modifier and Type | Field and Description |
---|---|
static IsColor |
DEFAULT_VALUE_COLOR
Default color value
|
Constructor and Description |
---|
Threshold(String name)
Creates a threshold with standard color (
DEFAULT_VALUE_COLOR ) and value
(Double.MAX_VALUE ). |
Threshold(String name,
double value)
Creates a threshold with standard color (
DEFAULT_VALUE_COLOR ). |
Threshold(String name,
double value,
IsColor color)
Creates a threshold
|
Threshold(String name,
IsColor color)
Creates a threshold with standard value (
Double.MAX_VALUE ). |
Modifier and Type | Method and Description |
---|---|
IsColor |
getColor()
Returns the color of threshold.
|
String |
getName()
Returns the name of threshold.
|
double |
getValue()
Returns the value of threshold.
|
boolean |
isInRange(double valueToCheck,
double lowLimit)
Checks if the value passed is into threshold.
|
Threshold |
setColor(IsColor color)
Sets the color of threshold.
|
Threshold |
setValue(double value)
Sets the value of threshold.
|
public static final IsColor DEFAULT_VALUE_COLOR
GaugeThreshold.normal
public Threshold(String name)
DEFAULT_VALUE_COLOR
) and value
(Double.MAX_VALUE
).name
- name of thresholdpublic Threshold(String name, IsColor color)
Double.MAX_VALUE
).name
- name of thresholdcolor
- color of thresholdpublic Threshold(String name, double value)
DEFAULT_VALUE_COLOR
).name
- name of thresholdvalue
- value of thresholdpublic String getName()
IsThreshold
getName
in interface IsThreshold
public double getValue()
IsThreshold
getValue
in interface IsThreshold
public IsColor getColor()
IsThreshold
getColor
in interface IsThreshold
public Threshold setValue(double value)
value
- the value to setpublic Threshold setColor(IsColor color)
color
- the color to setpublic boolean isInRange(double valueToCheck, double lowLimit)
valueToCheck
- value to checklowLimit
- the low limittrue
is the value is inside the range, otherwise false
.