Package de.timmfitschen.easyunits
Class DefaultSystemOfUnitsFactory
- java.lang.Object
-
- de.timmfitschen.easyunits.DefaultSystemOfUnitsFactory
-
- All Implemented Interfaces:
SystemOfUnitsFactory
public class DefaultSystemOfUnitsFactory extends Object implements SystemOfUnitsFactory
-
-
Constructor Summary
Constructors Constructor Description DefaultSystemOfUnitsFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(BaseUnit b)voidadd(Prefix p)voidadd(DerivedUnit d)protected voidaddPrefixedUnit(Prefix prefix, Unit unit)protected voidaddUnitWithAllNames(Unit unit)SystemOfUnitscreate()protected HashMap<String,Unit>getAllunits()UnitgetUnit(String unit)
-
-
-
Method Detail
-
create
public SystemOfUnits create()
- Specified by:
createin interfaceSystemOfUnitsFactory
-
add
public void add(Prefix p) throws SystemOfUnitsException
- Specified by:
addin interfaceSystemOfUnitsFactory- Throws:
SystemOfUnitsException
-
addUnitWithAllNames
protected void addUnitWithAllNames(Unit unit) throws SystemOfUnitsException
- Throws:
SystemOfUnitsException
-
addPrefixedUnit
protected void addPrefixedUnit(Prefix prefix, Unit unit) throws SystemOfUnitsException
- Throws:
SystemOfUnitsException
-
add
public void add(DerivedUnit d) throws SystemOfUnitsException
- Specified by:
addin interfaceSystemOfUnitsFactory- Throws:
SystemOfUnitsException
-
add
public void add(BaseUnit b) throws SystemOfUnitsException
- Specified by:
addin interfaceSystemOfUnitsFactory- Throws:
SystemOfUnitsException
-
getUnit
public Unit getUnit(String unit)
- Specified by:
getUnitin interfaceSystemOfUnitsFactory
-
-