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 Details

    • ValueAndBooleanDataPoint

      public ValueAndBooleanDataPoint​(double value, boolean significant)
      Create a new ValueAndBooleanDataPoint object.
      Parameters:
      value - the value
      significant - 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

      public String toString()
      Returns the value as a string. Note that the value is rounded to two decimals.
      Overrides:
      toString in class Object
      Returns:
      the values as a string
    • compareTo

      public int compareTo​(ValueAndBooleanDataPoint o)
      Compares based on the value.
      Specified by:
      compareTo in interface Comparable<ValueAndBooleanDataPoint>