Package com.ibm.icu.dev.tool.timescale
Class CalculateLimits
java.lang.Object
com.ibm.icu.dev.tool.timescale.CalculateLimits
This class calculates the minimum and maximum values which can be
used as arguments to
toLong
and from
.
NOTE: If you change the way in which these values are calculated, it
may be necessary to disable to toRangeCheck()
and
fromRangeCheck()
methods in the UniversalTimeScale
for all of the calculations to run without throwing an error.- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
CalculateLimits
public CalculateLimits()The default constructor.
-
-
Method Details
-
main
This method first calculates thefrom
limits by passingLong.MIN_VALUE
andLong.MAX_VALUE
to the (internal)toBigDecimalTrunc()
method. Any values outside of the range of along
are pinned. The mimimum and maximum values fortoLong
are calculated by passing the min and max values calculated above toBigDecimalFrom()
. Because this method will round, the returned values are adjusted to take this into account.- Parameters:
args
- - the command line arguments- See Also:
-