fr.cnes.sitools.units.dimension.model
Class SitoolsUnitConverter

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

public abstract class SitoolsUnitConverter
extends javax.measure.unit.UnitConverter

Base class for converters to register for unit conversions Extends basic converter that is not sufficient for converters between unit with different dimensions

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

Field Summary
 
Fields inherited from class javax.measure.unit.UnitConverter
IDENTITY
 
Constructor Summary
SitoolsUnitConverter()
           
 
Method Summary
abstract  javax.measure.unit.UnitConverter getBaseToTargetConverter()
          Get the converter between the two units
 javax.measure.unit.Unit<?> getStartUnit()
          Gets the startUnit value
 javax.measure.unit.UnitConverter getTargetToBaseConverter()
          Get the converter in opposite way
 javax.measure.unit.Unit<?> getTargetUnit()
          Gets the targetUnit value
 void setStartUnit(javax.measure.unit.Unit<?> startUnit)
          Sets the value of startUnit
 void setTargetUnit(javax.measure.unit.Unit<?> targetUnit)
          Sets the value of targetUnit
 
Methods inherited from class javax.measure.unit.UnitConverter
concatenate, convert, convert, convert, equals, hashCode, inverse, isLinear
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SitoolsUnitConverter

public SitoolsUnitConverter()
Method Detail

setStartUnit

public final void setStartUnit(javax.measure.unit.Unit<?> startUnit)
Sets the value of startUnit

Parameters:
startUnit - the startUnit to set

setTargetUnit

public final void setTargetUnit(javax.measure.unit.Unit<?> targetUnit)
Sets the value of targetUnit

Parameters:
targetUnit - the targetUnit to set

getStartUnit

public javax.measure.unit.Unit<?> getStartUnit()
Gets the startUnit value

Returns:
the startUnit

getTargetUnit

public javax.measure.unit.Unit<?> getTargetUnit()
Gets the targetUnit value

Returns:
the targetUnit

getBaseToTargetConverter

public abstract javax.measure.unit.UnitConverter getBaseToTargetConverter()
Get the converter between the two units

Returns:
a Unit converter to go from base to target

getTargetToBaseConverter

public final javax.measure.unit.UnitConverter getTargetToBaseConverter()
Get the converter in opposite way

Returns:
a Unit converter to go from target to base


Copyright © 2010-2013 CNES. All Rights Reserved.