Enum TimeUnit

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      DAILY
      Daily time unit will result in a frequency where only "on minute" and "on hour" will be set, i.e.
      HOURLY
      Hourly time unit will result in a frequency where only "on minute" will be set, i.e.
      MINUTE
      For minute time units, it doesn't make sense to use any additional constraints: "on minute", "on hour", "on day of month" or "on day of week"
      MONTHLY
      Monthly time unit will result in a frequency where only "on minute", "on hour" and "on day of month" will be set, i.e.
      NOTIMEUNIT
      'No time unit' is only included for historic reasons, since 0 did not denote a timeunit.
      WEEKLY
      Weekly time unit will result in a frequency where only "on minute", "on hour" and "on day of week" will be set, i.e.
    • Enum Constant Detail

      • NOTIMEUNIT

        public static final TimeUnit NOTIMEUNIT
        'No time unit' is only included for historic reasons, since 0 did not denote a timeunit.
      • HOURLY

        public static final TimeUnit HOURLY
        Hourly time unit will result in a frequency where only "on minute" will be set, i.e. "on hour", "on day of week" and "on day of month" are unused.
      • DAILY

        public static final TimeUnit DAILY
        Daily time unit will result in a frequency where only "on minute" and "on hour" will be set, i.e. "on day of week" and "on day of month" are unused.
      • WEEKLY

        public static final TimeUnit WEEKLY
        Weekly time unit will result in a frequency where only "on minute", "on hour" and "on day of week" will be set, i.e. "on day of month" is unused.
      • MONTHLY

        public static final TimeUnit MONTHLY
        Monthly time unit will result in a frequency where only "on minute", "on hour" and "on day of month" will be set, i.e. "on day of week" is unused.
      • MINUTE

        public static final TimeUnit MINUTE
        For minute time units, it doesn't make sense to use any additional constraints: "on minute", "on hour", "on day of month" or "on day of week"
    • Method Detail

      • values

        public static TimeUnit[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (TimeUnit c : TimeUnit.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static TimeUnit valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • fromOrdinal

        public static TimeUnit fromOrdinal​(int tu)
        Helper method that gives a proper object from e.g. a DB-stored value.
        Parameters:
        tu - a certain integer for a timeunit
        Returns:
        the TimeUnit related to a certain integer
        Throws:
        ArgumentNotValid - If argument tu is invalid (i.e. does not correspond to a TimeUnit)