Class KiwiDurations

java.lang.Object
org.kiwiproject.time.KiwiDurations

public final class KiwiDurations extends Object
Utilities related to Java's Duration class.
  • Method Details

    • isPositive

      public static boolean isPositive(Duration duration)
      Check if a Duration is positive.
      Parameters:
      duration - the duration to check
      Returns:
      true if the duration is strictly positive, otherwise false
    • isPositiveOrZero

      public static boolean isPositiveOrZero(Duration duration)
      Check if a Duration is positive or zero.
      Parameters:
      duration - the duration to check
      Returns:
      true if the duration is positive or zero, otherwise false
    • isNegativeOrZero

      public static boolean isNegativeOrZero(Duration duration)
      Check if a Duration is negative or zero.
      Parameters:
      duration - the duration to check
      Returns:
      true if the duration is negative or zero, otherwise false