unitsofmeasurement / indriya

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

Break ComparableUnit into API and AbstractUnit #307

Closed keilw closed 3 years ago

keilw commented 3 years ago

The ComparableUnit interface contains 3 methods, 2 are merely convenience methods (getSystemConverter() and isSystemUnit()) that are used almost entirely inside Indriya, especially in AbstractUnit or subclasses. isEquivalentTo() allows to compare two units in a more flexible way, thus it seems beneficial to move that into the API element Unit. The other two methods are best located in AbstractUnit, so ComparableUnitcan be dissolved.