Class DefaultTmaUnitConversionStrategy

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.math.BigDecimal getUnitConversion​(UsageUnitModel fromUsageUnit, UsageUnitModel toUsageUnit, java.math.BigDecimal fromUsageUnitValue)
      Unit conversion strategy service for given fromUsageUnit to given toUsageUnit, for given fromUsageUnitValue
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultTmaUnitConversionStrategy

        public DefaultTmaUnitConversionStrategy()
    • Method Detail

      • getUnitConversion

        public java.math.BigDecimal getUnitConversion​(UsageUnitModel fromUsageUnit,
                                                      UsageUnitModel toUsageUnit,
                                                      java.math.BigDecimal fromUsageUnitValue)
        Description copied from interface: TmaUnitConversionStrategy
        Unit conversion strategy service for given fromUsageUnit to given toUsageUnit, for given fromUsageUnitValue
        Specified by:
        getUnitConversion in interface TmaUnitConversionStrategy
        Parameters:
        fromUsageUnit - the UsageUnitModel for the unit needs to converted
        toUsageUnit - the UsageUnitModel to which value needs to converted
        fromUsageUnitValue - the value of the unit needs to converted to toUsageUnit
        Returns:
        BigDecimal object after conversion