Package no.uib.jsparklines.data
Class ValueAndBooleanDataPoint
java.lang.Object
no.uib.jsparklines.data.ValueAndBooleanDataPoint
- All Implemented Interfaces:
Serializable
,Comparable<ValueAndBooleanDataPoint>
public class ValueAndBooleanDataPoint extends Object implements Comparable<ValueAndBooleanDataPoint>, Serializable
Object storing data about one data point and a corresponding significance
value.
- Author:
- Harald Barsnes
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description ValueAndBooleanDataPoint(double value, boolean significant)
Create a new ValueAndBooleanDataPoint object. -
Method Summary
Modifier and Type Method Description int
compareTo(ValueAndBooleanDataPoint o)
Compares based on the value.double
getValue()
Returns the value.boolean
isSignificant()
Returns the significance.void
setSignificant(boolean signigficant)
Set the significance.void
setValue(double value)
Set the value.String
toString()
Returns the value as a string.
-
Constructor Details
-
ValueAndBooleanDataPoint
public ValueAndBooleanDataPoint(double value, boolean significant)Create a new ValueAndBooleanDataPoint object.- Parameters:
value
- the valuesignificant
- is it significant?
-
-
Method Details
-
getValue
public double getValue()Returns the value.- Returns:
- the value
-
setValue
public void setValue(double value)Set the value.- Parameters:
value
- the value to set
-
isSignificant
public boolean isSignificant()Returns the significance.- Returns:
- the significance
-
setSignificant
public void setSignificant(boolean signigficant)Set the significance.- Parameters:
signigficant
- the significance to set
-
toString
Returns the value as a string. Note that the value is rounded to two decimals. -
compareTo
Compares based on the value.- Specified by:
compareTo
in interfaceComparable<ValueAndBooleanDataPoint>
-