How do you write your own custom measurement converters

721 views Asked by At

How do you write your own custom converters and specify the conversion factor using javax.measure packages. (e.g. Pint to gallons)

1

There are 1 answers

4
Stephen C On BEST ANSWER

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.