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 thefromlimits by passingLong.MIN_VALUEandLong.MAX_VALUEto the (internal)toBigDecimalTrunc()method. Any values outside of the range of alongare pinned. The mimimum and maximum values fortoLongare 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:
-