Class CalculateLimits

java.lang.Object
com.ibm.icu.dev.tool.timescale.CalculateLimits

public class CalculateLimits extends Object
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 Details

    • CalculateLimits

      public CalculateLimits()
      The default constructor.
  • Method Details

    • main

      public static void main(String[] args)
      This method first calculates the from limits by passing Long.MIN_VALUE and Long.MAX_VALUE to the (internal) toBigDecimalTrunc() method. Any values outside of the range of a long are pinned. The mimimum and maximum values for toLong are calculated by passing the min and max values calculated above to BigDecimalFrom(). Because this method will round, the returned values are adjusted to take this into account.
      Parameters:
      args - - the command line arguments
      See Also: