Package de.timmfitschen.easyunits
Class ConvertedUnit
- java.lang.Object
-
- de.timmfitschen.easyunits.UniqueSignatureObject
-
- de.timmfitschen.easyunits.Named
-
- de.timmfitschen.easyunits.Symboled
-
- de.timmfitschen.easyunits.Unit
-
- de.timmfitschen.easyunits.ConvertedUnit
-
- All Implemented Interfaces:
Signed
- Direct Known Subclasses:
DerivedUnit
public class ConvertedUnit extends Unit
-
-
Constructor Summary
Constructors Constructor Description ConvertedUnit(Unit unit, Converter converter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Converter
getConverter()
Return a converter for a conversion of this unit to the normalized unit.Unit
getNormalizedUnit()
Calculate the base unit or a compound unit that consists of base units only, without any prefixes.long
getSignature()
String
getSymbol()
-
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:Unit
Calculate 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:
getNormalizedUnit
in classUnit
- Returns:
- base unit/compound of base units.
-
getConverter
public Converter getConverter()
Description copied from class:Unit
Return a converter for a conversion of this unit to the normalized unit.- Specified by:
getConverter
in classUnit
- Returns:
-
getSignature
public long getSignature()
-
-