Interface ComparableMeasurement

    • Method Detail

      • getObservedValue

        double[] getObservedValue()
        Get the observed value.

        The observed value is the value that was measured by the instrument.

        Returns:
        observed value
      • setObservedValue

        void setObservedValue​(double[] newObserved)
        Set the observed value.

        The observed value is the value that was measured by the instrument.

        Parameters:
        newObserved - observed value
        Since:
        13.0
      • compareTo

        default int compareTo​(ComparableMeasurement other)

        Measurements comparison is primarily chronological, but measurements with the same date are sorted based on the observed value. Even if they have the same value too, they will likely not be considered equal if they correspond to different instances.

        Care should be taken before storing measurements in a SortedSet as it may lose redundant measurements if they, by chance, have the same identity hash code.

        Specified by:
        compareTo in interface Comparable<ComparableMeasurement>
        See Also:
        System.identityHashCode(Object)