Package org.goplanit.utils.unit
Class NoneUnit
- java.lang.Object
-
- org.goplanit.utils.unit.SimpleUnit
-
- org.goplanit.utils.unit.NoneUnit
-
- All Implemented Interfaces:
Unit
public class NoneUnit extends SimpleUnit
Simple unit that comprises a single unit- Author:
- markr
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedNoneUnit()Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doubleconvertTo(Unit to, double value)Convert one unit to the other for a given valuebooleanisCombinedUnit()Is the unit a single or combined unit-
Methods inherited from class org.goplanit.utils.unit.SimpleUnit
canConvertTo, equals, toString
-
-
-
-
Method Detail
-
isCombinedUnit
public boolean isCombinedUnit()
Is the unit a single or combined unit- Specified by:
isCombinedUnitin interfaceUnit- Overrides:
isCombinedUnitin classSimpleUnit- Returns:
- false when single, true when combined
-
convertTo
public double convertTo(Unit to, double value) throws PlanItException
Convert one unit to the other for a given value- Parameters:
to- to unitvalue- value to convert- Returns:
- converted value
- Throws:
PlanItException- thrown if not possible to perform conversion
-
-