Class CalculateLimits


  • public class CalculateLimits
    extends java.lang.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:
    UniversalTimeScale
    • Constructor Summary

      Constructors 
      Constructor Description
      CalculateLimits()
      The default constructor.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void main​(java.lang.String[] args)
      This method first calculates the from limits by passing Long.MIN_VALUE and Long.MAX_VALUE to the (internal) toBigDecimalTrunc() method.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CalculateLimits

        public CalculateLimits()
        The default constructor.
    • Method Detail

      • main

        public static void main​(java.lang.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:
        UniversalTimeScale