Replies: 1 comment 4 replies
-
|
Agreed. And I think the same should be done for AbstractQuantity as well (currently uses the SimpleQuantityFormat implementation). On a related note, there is currently no AbstractQuantityFormat implementation in the UCUM module, something which I plan to create a PR for once my application to the JSR as a contributor is approved. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently the
AbstractUnitbase class uses theSimpleUnitFormatimplementation:SimpleUnitFormat.getInstance()forparse()andtoString().Instead
AbstractUnit(or even theUnitinterface in a future version of the API) could callServiceProvider.current().getFormatService().getUnitFormat()using the "default" UnitFormat implementation from the "current"ServiceProvider, allowing extention modules like UCUM defining their ownUnitFormatServicein aServiceProviderwith a higher priority, then that module would become the default fortoString()andparse()operations of all units in an implementation.Beta Was this translation helpful? Give feedback.
All reactions