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
-
Currently the
AbstractUnit
base class uses theSimpleUnitFormat
implementation:SimpleUnitFormat.getInstance()
forparse()
andtoString()
.Instead
AbstractUnit
(or even theUnit
interface 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 ownUnitFormatService
in aServiceProvider
with 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