Class DurationUtils


  • class DurationUtils
    extends java.lang.Object
    Temporary until Commons Lang 3.12.0.
    • Constructor Summary

      Constructors 
      Constructor Description
      DurationUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static boolean isPositive​(java.time.Duration duration)
      Tests whether the given Duration is positive (>0).
      (package private) static int toMillisInt​(java.time.Duration duration)  
      (package private) static java.time.Duration zeroIfNull​(java.time.Duration controlIdle)  
      • Methods inherited from class java.lang.Object

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

      • DurationUtils

        DurationUtils()
    • Method Detail

      • isPositive

        static boolean isPositive​(java.time.Duration duration)
        Tests whether the given Duration is positive (>0).
        Parameters:
        duration - the value to test
        Returns:
        whether the given Duration is positive (>0).
      • toMillisInt

        static int toMillisInt​(java.time.Duration duration)
      • zeroIfNull

        static java.time.Duration zeroIfNull​(java.time.Duration controlIdle)