Esempio n. 1
0
 public static <Q extends Quantity> BigDecimal decimalValue(Measure<Q> measure, Unit<Q> unit) {
   return measure.decimalValue(unit, MathUtils.context());
 }
Esempio n. 2
0
 public static <Q extends Quantity> Measure<Q> convert(
     Measure<Q> measure, UnitConverter converter) {
   BigDecimal converted = converter.convert(decimalValue(measure), MathUtils.context());
   return Measure.valueOf(converted, measure.getUnit());
 }
Esempio n. 3
0
 public static <Q extends Quantity> BigDecimal decimalValue(Measure<Q> measure) {
   return measure.decimalValue(measure.getUnit(), MathUtils.context());
 }