Package adams.data.spectrum
Class SpectrumPoint
- java.lang.Object
-
- adams.data.container.AbstractDataPoint
-
- adams.data.spectrum.SpectrumPoint
-
- All Implemented Interfaces:
adams.core.CloneHandler,adams.data.container.DataPoint,Serializable,Comparable
public class SpectrumPoint extends adams.data.container.AbstractDataPointAbstract 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 floatm_Amplitudethe amplitude.protected floatm_WaveNumberthe wave number.
-
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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassign(adams.data.container.DataPoint other)Obtains the stored variables from the other data point.intcompareTo(Object o)Compares this object with the specified object for order.floatgetAmplitude()Returns the amplitude.floatgetWaveNumber()Returns the wave number.SpectrumPointparse(String s)Parses a string and instantiates a sequence point of it.voidsetAmplitude(float value)Sets the amplitude.voidsetWaveNumber(float value)Sets the wave number value.StringtoString()Returns a string representation of the point.
-
-
-
Method Detail
-
assign
public void assign(adams.data.container.DataPoint other)
Obtains the stored variables from the other data point.- Specified by:
assignin interfaceadams.data.container.DataPoint- Overrides:
assignin classadams.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:
compareToin interfaceComparable- Specified by:
compareToin classadams.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:
toStringin classadams.data.container.AbstractDataPoint- Returns:
- the string representation
-
-