Class DurationUtil

java.lang.Object
org.drasyl.plugin.groups.util.DurationUtil

public class DurationUtil extends Object
  • Method Details

    • normalize

      public static Duration normalize(Duration duration)
      Normalize the given duration to a minimum of 1m.
      Parameters:
      duration - the duration
      Returns:
      the normalized duration
    • max

      public static Duration max(Duration a, Duration b)
      Returns the greater of two Duration values.
      Parameters:
      a - an argument.
      b - another argument.
      Returns:
      the larger of a and b.
      Throws:
      NullPointerException - if one or both values are null