|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.nrao.sss.measure.Wave
public class Wave
A wave with properties of velocity, wavelength, and frequency.
Version Info:
$Revision: 1490 $ |
$Date: 2008-08-13 16:38:27 -0600 (Wed, 13 Aug 2008) $ |
$Author: dharland $ |
Field Summary | |
---|---|
static BigDecimal |
LIGHT_SPEED_VACUUM_KM_PER_SEC
The speed of light in a vacuum, expressed in kilometers per second. |
Constructor Summary | |
---|---|
Wave()
Creates a new wave with velocity equal to that of light in a vacuum. |
|
Wave(LinearVelocity speedOfWave)
Creates a new wave with the given velocity. |
Method Summary | |
---|---|
Frequency |
getFrequency()
Returns a copy of this wave's frequency. |
BigDecimal |
getFrequencyValueIn(FrequencyUnits units)
Returns the frequency of this wave in the given units. |
LinearVelocity |
getVelocity()
Returns a copy of the velocity of this wave. |
BigDecimal |
getVelocityValueIn(LinearVelocityUnits units)
Returns the velocity of this wave in the given units. |
Distance |
getWavelength()
Returns a copy of this wave's wavelength. |
BigDecimal |
getWavelengthValueIn(DistanceUnits units)
Returns the wavelength of this wave in the given units. |
Wave |
setFrequency(Frequency newFrequency)
Sets this wave's frequency so that it is equal to newFrequency . |
Wave |
setVelocity(LinearVelocity newVelocity)
Sets this wave's velocity so that it is equal to newVelocity . |
Wave |
setWavelength(Distance newWavelength)
Sets this wave's wavelength so that it is equal to newWavelength . |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final BigDecimal LIGHT_SPEED_VACUUM_KM_PER_SEC
Constructor Detail |
---|
public Wave()
public Wave(LinearVelocity speedOfWave)
speedOfWave
- the velocity of this wave.
IllegalArgumentException
- if speedOfWave
is null
or has a non-positive value.Method Detail |
---|
public Wave setVelocity(LinearVelocity newVelocity)
newVelocity
.
Changing this wave's velocity will force a corresponding change in its
wavelength while its frequency will be held constant.
newVelocity
- a new velocity for this wave.
IllegalArgumentException
- if newVelocity
is null
or has a non-positive value.public LinearVelocity getVelocity()
public BigDecimal getVelocityValueIn(LinearVelocityUnits units)
getVelocity().toUnits(units)
because getVelocity()
makes a copy of this wave's velocity, while this method does not.
units
- units of velocity.
public Wave setFrequency(Frequency newFrequency)
newFrequency
.
Changing this wave's frequency will result in a corresponding change
in its wavelength while its velocity will be held constant.
newFrequency
- a new frequency for this wave.
IllegalArgumentException
- if newFrequency
is null
or has a non-positive value.public Frequency getFrequency()
public BigDecimal getFrequencyValueIn(FrequencyUnits units)
getFrequency().asUnitsOf(units)
because getFrequency()
makes a copy of this wave's frequency, while this method does not.
units
- units of frequency.
public Wave setWavelength(Distance newWavelength)
newWavelength
.
Changing this wave's wavelength will result in a corresponding change
in its frequency while its velocity will be held constant.
newWavelength
- a new wavelength for this wave.
IllegalArgumentException
- if newWavelength
is null
or has a non-positive length.public Distance getWavelength()
public BigDecimal getWavelengthValueIn(DistanceUnits units)
getWavelength().toUnits(units)
because getWavelength()
makes a copy of this wave's wavelength, while this method does not.
units
- units of wavelength.
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |