com.atlassian.scheduler.core.util
Enum CronExpressionQuantizer.Randomize

java.lang.Object
  extended by java.lang.Enum<CronExpressionQuantizer.Randomize>
      extended by com.atlassian.scheduler.core.util.CronExpressionQuantizer.Randomize
All Implemented Interfaces:
Serializable, Comparable<CronExpressionQuantizer.Randomize>
Enclosing class:
CronExpressionQuantizer

public static enum CronExpressionQuantizer.Randomize
extends Enum<CronExpressionQuantizer.Randomize>

Controls whether or not randomization is performed when a cron expression is quantized.


Enum Constant Summary
ALWAYS
          Replace the seconds fields with a randomized value in all cases.
AS_NEEDED
          Randomize the seconds field if quantization is needed; otherwise, leave it alone.
NEVER
          Never randomize the seconds field.
 
Method Summary
static CronExpressionQuantizer.Randomize valueOf(String name)
          Returns the enum constant of this type with the specified name.
static CronExpressionQuantizer.Randomize[] 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

NEVER

public static final CronExpressionQuantizer.Randomize NEVER
Never randomize the seconds field. If the supplied value does not meet the requirement (a simple integer from 0 to 59), then force it to 0.


AS_NEEDED

public static final CronExpressionQuantizer.Randomize AS_NEEDED
Randomize the seconds field if quantization is needed; otherwise, leave it alone. If the supplied value does not meet the requirement (a simple integer from 0 to 59), then force it to a randomized value; otherwise, leave it alone.


ALWAYS

public static final CronExpressionQuantizer.Randomize ALWAYS
Replace the seconds fields with a randomized value in all cases. The replacement is performed regardless of whether or not the value was already in the permitted format.

Method Detail

values

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

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

valueOf

public static CronExpressionQuantizer.Randomize 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


Copyright © 2014 Atlassian. All Rights Reserved.