Package de.timmfitschen.easyunits
Class CompoundUnit
- java.lang.Object
-
- de.timmfitschen.easyunits.UniqueSignatureObject
-
- de.timmfitschen.easyunits.Named
-
- de.timmfitschen.easyunits.Symboled
-
- de.timmfitschen.easyunits.Unit
-
- de.timmfitschen.easyunits.CompoundUnit
-
-
Constructor Summary
Constructors Constructor Description CompoundUnit(Map<Unit,Integer> components)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<Unit,Integer>getComponents()ConvertergetConverter()Return a converter for a conversion of this unit to the normalized unit.UnitgetNormalizedUnit()Calculate the base unit or a compound unit that consists of base units only, without any prefixes.longgetSignature()StringgetSymbol()StringtoString()-
Methods inherited from class de.timmfitschen.easyunits.Unit
add, divide, divide, getPrefixableBy, hashCode, isNormal, isPrefixableBy, power, setPrefixableBy, times, times, transform
-
Methods inherited from class de.timmfitschen.easyunits.UniqueSignatureObject
equals
-
-
-
-
Method Detail
-
getNormalizedUnit
public Unit getNormalizedUnit()
Description copied from class:UnitCalculate the base unit or a compound unit that consists of base units only, without any prefixes. This is the target unit of the converter.- Specified by:
getNormalizedUnitin classUnit- Returns:
- base unit/compound of base units.
-
getConverter
public Converter getConverter()
Description copied from class:UnitReturn a converter for a conversion of this unit to the normalized unit.- Specified by:
getConverterin classUnit- Returns:
-
getSignature
public long getSignature()
-
-