Infinite duration: greater than any other and not equal to any other, including itself.
Infinite negative duration: lesser than any other and not equal to any other, including itself.
Construct a Duration by parsing a String.
Construct a Duration by parsing a String. In case of a format error, a
RuntimeException is thrown. See unapply(String)
for more information.
Parse TimeUnit from string representation.
Parse String, return None if no match.
Parse String, return None if no match. Format is "<length><unit>"
, where
whitespace is allowed before, between and after the parts. Infinities are
designated by "Inf"
and "-Inf"
or "MinusInf"
.
Deconstruct a Duration into length and unit if it is finite.