Class SystemUnit.DimToUnit

All Implemented Interfaces:
Serializable, Function<UnitDimension,SystemUnit<?>>, ObjectConverter<UnitDimension,SystemUnit<?>>
Enclosing class:
SystemUnit<Q extends javax.measure.Quantity<Q>>

private static final class SystemUnit.DimToUnit extends SurjectiveConverter<UnitDimension,SystemUnit<?>> implements Serializable
The converter for replacing the keys in the SystemUnit.getBaseUnits() map from UnitDimension instances to SystemUnit instances. We apply conversions on the fly instead of extracting the data in a new map once for all because the copy may fail if an entry contains a rational instead of an integer power. With on-the-fly conversions, the operation will not fail if the user never ask for that particular value.