java.lang.Object
io.sf.carte.doc.style.css.UnitStringToId
Obtain the numeric unit from the unit string.
The benchmarks used to choose the implementation are available in the
UnitStringToNumberMark
class in the css4j Benchmarks repository.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic short
unitFromString
(String unit) Retrieves the CSS unit associated to the given unit string.
-
Constructor Details
-
UnitStringToId
public UnitStringToId()
-
-
Method Details
-
unitFromString
Retrieves the CSS unit associated to the given unit string.- Parameters:
unit
- the unit string.- Returns:
- the associated CSS unit, or
CSS_OTHER
if the unit is not known.
-