Package org.goplanit.utils.unit
Class SrsUnit
- java.lang.Object
-
- org.goplanit.utils.unit.SimpleUnit
-
- org.goplanit.utils.unit.SrsUnit
-
- All Implemented Interfaces:
Unit
public class SrsUnit extends SimpleUnit
Unit class for all spatial reference system related units- Author:
- markr
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SrsUnit()
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canConvertTo(Unit other)
Verify if unit can be converted to the desired unitdouble
convertTo(Unit to, double value)
Convert one unit to the other for a given value-
Methods inherited from class org.goplanit.utils.unit.SimpleUnit
equals, isCombinedUnit, toString
-
-
-
-
Method Detail
-
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
-
canConvertTo
public boolean canConvertTo(Unit other)
Verify if unit can be converted to the desired unit- Specified by:
canConvertTo
in interfaceUnit
- Overrides:
canConvertTo
in classSimpleUnit
- Parameters:
other
- to unit- Returns:
- true when compatible, false otherwise
-
-