Class AbstractDataPoint

    • Field Detail

      • m_Parent

        protected DataContainer m_Parent
        the container this data point belongs to.
    • Constructor Detail

      • AbstractDataPoint

        public AbstractDataPoint()
    • Method Detail

      • setParent

        public void setParent​(DataContainer value)
        Sets the spectrum this point belongs to.
        Specified by:
        setParent in interface DataPoint
        Parameters:
        value - the spectrum
      • getParent

        public DataContainer getParent()
        Returns the spectrum this point belongs to.
        Specified by:
        getParent in interface DataPoint
        Returns:
        the spectrum, can be null
      • hasParent

        public boolean hasParent()
        Returns whether the point belongs to a spectrum.
        Specified by:
        hasParent in interface DataPoint
        Returns:
        true if the point belongs to a spectrum
      • compareTo

        public abstract int compareTo​(Object o)
        Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
        Specified by:
        compareTo in interface Comparable
        Parameters:
        o - the object to be compared.
        Returns:
        a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
        Throws:
        ClassCastException - if the specified object's type prevents it from being compared to this object.
      • equals

        public boolean equals​(Object obj)
        Indicates whether some other object is "equal to" this one.
        Overrides:
        equals in class Object
        Parameters:
        obj - the reference object with which to compare.
        Returns:
        true if this object is the same as the obj argument; false otherwise.
      • assign

        public void assign​(DataPoint other)
        Obtains the stored variables from the other data point.
        Specified by:
        assign in interface DataPoint
        Parameters:
        other - the data point to get the values from
      • toString

        public abstract String toString()
        Returns a string representation of the point.
        Overrides:
        toString in class Object
        Returns:
        the string representation
      • toDouble

        public static Double toDouble​(Object value)
        Turns the Short into a double, if possible.
        Parameters:
        value - the value to convert
        Returns:
        the double or null if not a number
      • toDouble

        public static Double toDouble​(Number value)
        Turns the Number object into a double.
        Parameters:
        value - the value to convert
        Returns:
        the double
      • toDouble

        public static Double toDouble​(Byte value)
        Turns the Byte object into a double.
        Parameters:
        value - the value to convert
        Returns:
        the double
      • toDouble

        public static Double toDouble​(Short value)
        Turns the Short object into a double.
        Parameters:
        value - the value to convert
        Returns:
        the double
      • toDouble

        public static Double toDouble​(Integer value)
        Turns the Integer object into a double.
        Parameters:
        value - the value to convert
        Returns:
        the double
      • toDouble

        public static Double toDouble​(Long value)
        Turns the Long object into a double.
        Parameters:
        value - the value to convert
        Returns:
        the double
      • toDouble

        public static Double toDouble​(Float value)
        Turns the Float object into a double.
        Parameters:
        value - the value to convert
        Returns:
        the double
      • toDouble

        public static Double toDouble​(Double value)
        Turns the Double object into a double.
        Parameters:
        value - the value to convert
        Returns:
        the double