3

I'm using javax.measure:unit-api:1.0, and I can't even find any way to actually instantiate a (number, unit) pair which I thought was the whole point of this API. All the documentation seems to be geared to the development of the library itself and I can't find anything but a line or two of deprecated code in terms of usage examples.

I can find some (still very little) documentation for the old JScience library but by now most things have been changed.

zjuhasz
  • 1,489
  • 12
  • 30
  • FYI, the JSR 363 specification can be read here https://jcp.org/aboutJava/communityprocess/final/jsr363/index.html. It isn't documentation, but that's a start. – Tunaki Sep 26 '16 at 19:38
  • @Tunaki yeah I've skimmed through it, I'm really just looking for anything that will help me get started using it and I can't find anything in that document that really does that. – zjuhasz Sep 26 '16 at 19:51
  • 2
    Look at the `ServiceProvider` class, this is the entry point (chapter 5). – Tunaki Sep 26 '16 at 19:52
  • I'm reading through it now. – zjuhasz Sep 26 '16 at 20:10
  • Alright, I didn't read this carefully enough the first time. I made the mistake of just trying to use the API instead of the reference implementation ('tec.units:unit-ri:1.0'), the RI has a lot of additional stuff which makes it much easier to get started. Thank you, @Tunaki. – zjuhasz Sep 26 '16 at 20:33

0 Answers0