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