Package org.orekit.utils.units
Class UnitsCache
java.lang.Object
org.orekit.utils.units.UnitsCache
Cache for parsed units.
- Since:
- 11.0
- Author:
- Luc Maisonobe
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
UnitsCache
public UnitsCache()Simple constructor.
-
-
Method Details
-
getUnits
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.NONEif specification is null)
-