unitsofmeasurement / indriya

JSR 385 - Reference Implementation
Other
115 stars 40 forks source link

Allow to create a standard SymbolMap for EBNF #403

Open keilw opened 9 months ago

keilw commented 9 months ago

Currently SymbolMap.of(ResourceBundle rb) takes a given ResourceBundle. We would like to add another static factory method, e.g. SymbolMap.ofEBNF() (similar to the noarg methods in List, Set or Map) or forEBNF() which uses the ResourceBundle for EBNFUnitFormat without exposing its internals, e.g. the bundle path, as that could change in a future version.

So the SymbolMap instance can be enriched via alias() or label() methods before creating an EBNFUnitFormat with it.