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 protected
NoneUnit()
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
convertTo(Unit to, double value)
Convert one unit to the other for a given valueboolean
isCombinedUnit()
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:
isCombinedUnit
in interfaceUnit
- Overrides:
isCombinedUnit
in classSimpleUnit
- Returns:
- false when single, true when combined
-
convertTo
public double convertTo(Unit to, double value)
Convert one unit to the other for a given value- Parameters:
to
- to unitvalue
- value to convert- Returns:
- converted value
-
-