开发者

How do you write your own custom measurement converters

How do you write your own custo开发者_运维知识库m converters and specify the conversion factor using javax.measure packages. (e.g. Pint to gallons)


Well, I don't know the "correct" way to do it, but the obvious way would be to follow the pattern of the NonSI class; i.e. create your own class containing statics for each unit, with values based on the standard definitions for the non-SI units in terms of SI units.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜