嗨,我是新的使用jsr 363来做一个单位转换应用程序。有人能帮助我使用jsr 363库(uni-api)完成英里和公里之间的转换吗?
发布于 2016-08-25 14:42:27
就这样做了:
Quantity<Length> len = Quantities.getQuantity(10, MetricPrefix.KILO(Units.METRE));
Quantity<Length> mile = len.to(USCustomary.MILE);您将找到在https://github.com/unitsofmeasurement/uom-demos/tree/master/console/systems/common下使用公共系统(包括https://github.com/unitsofmeasurement/uom-demos/tree/master/console/systems/common)的示例
干杯,沃纳
https://stackoverflow.com/questions/37723490
复制相似问题