com.espertech.esper.type
Enum ScheduleUnit

java.lang.Object
  extended by java.lang.Enum<ScheduleUnit>
      extended by com.espertech.esper.type.ScheduleUnit
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ScheduleUnit>

public enum ScheduleUnit
extends java.lang.Enum<ScheduleUnit>

Enumeration of units in a specification of schedule, which contains elements for each of the following units: minute, hour, day of month, month, day of week and seconds. Notice: value ranges are the same as the "crontab" standard values not the Java Calendar field values. The Java Calendar MONTH value range is 0 to 11, while in this enum the range is 1 to 12.


Enum Constant Summary
DAYS_OF_MONTH
          Day of month.
DAYS_OF_WEEK
          Day of week.
HOURS
          Hour.
MINUTES
          Minute.
MONTHS
          Month.
SECONDS
          Second.
 
Method Summary
 int max()
          Returns minimum valid value for the unit.
 int min()
          Returns minimum valid value for the unit.
static ScheduleUnit valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ScheduleUnit[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

MINUTES

public static final ScheduleUnit MINUTES
Minute.


HOURS

public static final ScheduleUnit HOURS
Hour.


DAYS_OF_MONTH

public static final ScheduleUnit DAYS_OF_MONTH
Day of month.


MONTHS

public static final ScheduleUnit MONTHS
Month.


DAYS_OF_WEEK

public static final ScheduleUnit DAYS_OF_WEEK
Day of week.


SECONDS

public static final ScheduleUnit SECONDS
Second.

Method Detail

values

public static ScheduleUnit[] 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 (ScheduleUnit c : ScheduleUnit.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ScheduleUnit valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

min

public int min()
Returns minimum valid value for the unit.

Returns:
minimum unit value

max

public int max()
Returns minimum valid value for the unit.

Returns:
maximum unit value

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com