Class SpectrumPoint

  • All Implemented Interfaces:
    adams.core.CloneHandler, adams.data.container.DataPoint, Serializable, Comparable

    public class SpectrumPoint
    extends adams.data.container.AbstractDataPoint
    Abstract superclass for sequence points.
    Version:
    $Revision: 11831 $
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected float m_Amplitude
      the amplitude.
      protected float m_WaveNumber
      the wave number.
      • Fields inherited from class adams.data.container.AbstractDataPoint

        m_Parent
    • Constructor Summary

      Constructors 
      Constructor Description
      SpectrumPoint()
      Initializes the point with wave number and amplitude as -1.
      SpectrumPoint​(float waveno, float amplitude)
      Initializes the point with no ID.
    • Field Detail

      • m_WaveNumber

        protected float m_WaveNumber
        the wave number.
      • m_Amplitude

        protected float m_Amplitude
        the amplitude.
    • Constructor Detail

      • SpectrumPoint

        public SpectrumPoint()
        Initializes the point with wave number and amplitude as -1.
      • SpectrumPoint

        public SpectrumPoint​(float waveno,
                             float amplitude)
        Initializes the point with no ID.
        Parameters:
        waveno - the X value
        amplitude - the Y value
    • Method Detail

      • assign

        public void assign​(adams.data.container.DataPoint other)
        Obtains the stored variables from the other data point.
        Specified by:
        assign in interface adams.data.container.DataPoint
        Overrides:
        assign in class adams.data.container.AbstractDataPoint
        Parameters:
        other - the data point to get the values from
      • setWaveNumber

        public void setWaveNumber​(float value)
        Sets the wave number value.
        Parameters:
        value - the new wave number
      • getWaveNumber

        public float getWaveNumber()
        Returns the wave number.
        Returns:
        the wave number
      • setAmplitude

        public void setAmplitude​(float value)
        Sets the amplitude.
        Parameters:
        value - the new amplitude
      • getAmplitude

        public float getAmplitude()
        Returns the amplitude.
        Returns:
        the amplitude
      • compareTo

        public 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
        Specified by:
        compareTo in class adams.data.container.AbstractDataPoint
        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.
      • parse

        public SpectrumPoint parse​(String s)
        Parses a string and instantiates a sequence point of it.
        Parameters:
        s - the string to parse
        Returns:
        the instantiated point, null in case of an error
      • toString

        public String toString()
        Returns a string representation of the point.
        Specified by:
        toString in class adams.data.container.AbstractDataPoint
        Returns:
        the string representation