fr.cnes.sitools.units.converters
Class FrequencyWavelengthConverter

java.lang.Object
  extended by javax.measure.unit.UnitConverter
      extended by fr.cnes.sitools.units.dimension.model.SitoolsUnitConverter
          extended by fr.cnes.sitools.units.converters.FrequencyWavelengthConverter
All Implemented Interfaces:
java.io.Serializable

public class FrequencyWavelengthConverter
extends SitoolsUnitConverter

Converter to go from frequency to wavelength

Author:
m.marseille (AKKA Technologies)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.measure.unit.UnitConverter
IDENTITY
 
Constructor Summary
FrequencyWavelengthConverter()
          Constructor
 
Method Summary
 double convert(double value)
          Converts a double value.
 java.lang.Number convert(java.lang.Number value, java.math.MathContext ctx)
          Converts a Number value.
 boolean equals(java.lang.Object cvtr)
          Indicates whether this converter is considered to be the the same as the one specified.
 javax.measure.unit.UnitConverter getBaseToTargetConverter()
          Get the converter between the two units
 int hashCode()
          Returns a hash code value for this converter.
 javax.measure.unit.UnitConverter inverse()
          Returns the inverse of this converter.
 boolean isLinear()
          Indicates if this converter is linear.
 
Methods inherited from class fr.cnes.sitools.units.dimension.model.SitoolsUnitConverter
getStartUnit, getTargetToBaseConverter, getTargetUnit, setStartUnit, setTargetUnit
 
Methods inherited from class javax.measure.unit.UnitConverter
concatenate, convert
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FrequencyWavelengthConverter

public FrequencyWavelengthConverter()
Constructor

Method Detail

getBaseToTargetConverter

public javax.measure.unit.UnitConverter getBaseToTargetConverter()
Description copied from class: SitoolsUnitConverter
Get the converter between the two units

Specified by:
getBaseToTargetConverter in class SitoolsUnitConverter
Returns:
a Unit converter to go from base to target

inverse

public javax.measure.unit.UnitConverter inverse()
Description copied from class: javax.measure.unit.UnitConverter
Returns the inverse of this converter. If x is a valid value, then x == inverse().convert(convert(x)) to within the accuracy of computer arithmetic.

Specified by:
inverse in class javax.measure.unit.UnitConverter
Returns:
the inverse of this converter.

convert

public double convert(double value)
Description copied from class: javax.measure.unit.UnitConverter
Converts a double value.

Specified by:
convert in class javax.measure.unit.UnitConverter
Parameters:
value - the numeric value to convert.
Returns:
the double value after conversion.

convert

public java.lang.Number convert(java.lang.Number value,
                                java.math.MathContext ctx)
Description copied from class: javax.measure.unit.UnitConverter
Converts a Number value.

Specified by:
convert in class javax.measure.unit.UnitConverter
Parameters:
value - the numeric value to convert.
ctx - the math context being used for conversion.
Returns:
the decimal value after conversion.

equals

public boolean equals(java.lang.Object cvtr)
Description copied from class: javax.measure.unit.UnitConverter
Indicates whether this converter is considered to be the the same as the one specified.

Specified by:
equals in class javax.measure.unit.UnitConverter
Parameters:
cvtr - the converter with which to compare.
Returns:
true if the specified object is a converter considered equals to this converter;false otherwise.

hashCode

public int hashCode()
Description copied from class: javax.measure.unit.UnitConverter
Returns a hash code value for this converter. Equals object have equal hash codes.

Specified by:
hashCode in class javax.measure.unit.UnitConverter
Returns:
this converter hash code value.
See Also:
UnitConverter.equals(java.lang.Object)

isLinear

public boolean isLinear()
Description copied from class: javax.measure.unit.UnitConverter
Indicates if this converter is linear. A converter is linear if convert(u + v) == convert(u) + convert(v) and convert(r * u) == r * convert(u). For linear converters the following property always hold:[code] y1 = c1.convert(x1); y2 = c2.convert(x2); // then y1*y2 == c1.concatenate(c2).convert(x1*x2) [/code]

Specified by:
isLinear in class javax.measure.unit.UnitConverter
Returns:
true if this converter is made of distinct converter; false otherwise.


Copyright © 2010-2013 CNES. All Rights Reserved.