Exemple #1
0
 public static <Q extends Quantity> BigDecimal decimalValue(Measure<Q> measure, Unit<Q> unit) {
   return measure.decimalValue(unit, MathUtils.context());
 }
Exemple #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());
 }
Exemple #3
0
 public static <Q extends Quantity> BigDecimal decimalValue(Measure<Q> measure) {
   return measure.decimalValue(measure.getUnit(), MathUtils.context());
 }