Package org.orekit.utils.units
Class UnitsCache
- java.lang.Object
-
- org.orekit.utils.units.UnitsCache
-
public class UnitsCache extends Object
Cache for parsed units.- Since:
- 11.0
- Author:
- Luc Maisonobe
-
-
Constructor Summary
Constructors Constructor Description UnitsCache()
Simple constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Unit
getUnits(String specification)
Get units from a string specification.
-
-
-
Method Detail
-
getUnits
public Unit getUnits(String specification)
Get units from a string specification.Parsing is performed only the first time a specification is encountered, so the cache speeds up cases where the same units is encountered many times (for example when parsing CCSDS messages with many entries).
- Parameters:
specification
- units specification (may be null)- Returns:
- parsed units (
Unit.NONE
if specification is null)
-
-