Affects Version/s: current
Fix Version/s: Version 6.0
Operating System: All
The current version 3.0.2 of javax.unit.Unit seems to have no functionality to
find out that a unit like SI.RADIANS or NonSI.DEGREE_ANGLE belongs to Angle
and not to Dimensionless.
The problem seems related to the problem described in
https://jscience.dev.java.net/issues/show_bug.cgi?id=3. Hence the current
version 3.0.2 does not have the function Unit.getParentUnit().
Comment copied from e-mail of Jean-Marie Dautelle:
You raise an interesting question. If the unit is a product of non-scaled
units, it is simple (e.g. unit.equals(SI.RADIANS)).
In the most general case (e.g. scaled units), we can provide a
Unit.getUnscaledUnits() method which would return the unscaled units
(typically a ProductUnit) that you can test for equality:
unit.getUnscaledUnits().equals(RADIANS.divide(SECOND)); // Angular velocity.