flux
Class CronColumn

java.lang.Object
  extended by flux.CronColumn
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable

public class CronColumn
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable

An ordered enumeration of Cron columns used in a Cron-style Time Expression.

Author:
Copyright 2014 Flux Corporation. All rights reserved.
See Also:
Serialized Form

Field Summary
static CronColumn DAY_OF_MONTH
          The Day-of-Month Cron column.
static CronColumn DAY_OF_WEEK
          The Day-of-Week Cron column.
static CronColumn DAY_OF_YEAR
          The Day-of-Year Cron column.
static CronColumn HOUR
          The Hour Cron column.
static CronColumn MILLISECOND
          The Millisecond Cron column.
static CronColumn MINUTE
          The Minute Cron column.
static CronColumn MONTH
          The Month Cron column.
static CronColumn SECOND
          The Second Cron column.
static java.util.List VALUES
          The Cron columns as an ordered enumeration.
static CronColumn WEEK_OF_MONTH
          The Week-of-Month Cron column.
static CronColumn WEEK_OF_YEAR
          The Week-of-Year Cron column.
static CronColumn YEAR
          The Year Cron column.
 
Method Summary
 int compareTo(java.lang.Object o)
          Determines whether one enumerated element precedes another.
static CronColumn getInstance(java.lang.String enumeration)
          Returns a pre-existing instance of this enumeration from the specified name.
 int getMaximum()
          Returns the maximum legal value for the Cron column.
 int getMinimum()
          Returns the minimum legal value for the Cron column.
 java.lang.String getName()
          Returns the name of the Cron column.
static CronColumn next(CronColumn column)
          Returns the following CronColumn to the specified CronColumn.
static CronColumn previous(CronColumn column)
          Returns the previous CronColumn to the specified CronColumn.
 java.lang.String toString()
          Returns the name of the Cron column.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MILLISECOND

public static final CronColumn MILLISECOND
The Millisecond Cron column. Legal values include 0-999.


SECOND

public static final CronColumn SECOND
The Second Cron column. Legal values include 0-59.


MINUTE

public static final CronColumn MINUTE
The Minute Cron column. Legal values include 0-59.


HOUR

public static final CronColumn HOUR
The Hour Cron column. Legal values include 0-23.


DAY_OF_MONTH

public static final CronColumn DAY_OF_MONTH
The Day-of-Month Cron column. Legal values include 1-31.


MONTH

public static final CronColumn MONTH
The Month Cron column. Legal values include 0-11.


DAY_OF_WEEK

public static final CronColumn DAY_OF_WEEK
The Day-of-Week Cron column. Legal values include Sun-Sat and 1-7.


DAY_OF_YEAR

public static final CronColumn DAY_OF_YEAR
The Day-of-Year Cron column. Legal values include 1-366.


WEEK_OF_MONTH

public static final CronColumn WEEK_OF_MONTH
The Week-of-Month Cron column. Legal values include "minimum" up to 6, where "minimum" is either 0 or 1, depending on the locale. In the United States locale, "minimum" is 1. Note that if the computer's locale is switched while Flux is running, Flux must be shut down and restarted to recognize the new locale. This restart is required for Cron-style time expressions to work correctly in the new locale.


WEEK_OF_YEAR

public static final CronColumn WEEK_OF_YEAR
The Week-of-Year Cron column. Legal values include "minimum" up to 53, where "minimum" is either 0 or 1, depending on the locale. In the United States locale, "minimum" is 1. Note that if the computer's locale is switched while Flux is running, Flux must be shut down and restarted to recognize the new locale. This restart is required for Cron-style time expressions to work correctly in the new locale.


YEAR

public static final CronColumn YEAR
The Year Cron column. Legal values include 1970-3000.


VALUES

public static final java.util.List VALUES
The Cron columns as an ordered enumeration.

Method Detail

getInstance

public static CronColumn getInstance(java.lang.String enumeration)
Returns a pre-existing instance of this enumeration from the specified name.

Parameters:
enumeration - The name of a pre-existing instance of this enumeration.
Returns:
A pre-existing instance of this enumeration from the specified name.
Throws:
java.lang.IllegalArgumentException - If the name of the specified enumeration instance does not exist.

next

public static final CronColumn next(CronColumn column)
Returns the following CronColumn to the specified CronColumn. CronColumns are ordered.

Parameters:
column - The base CronColumn. The CronColumn immediately following the base CronColumn will be returned.
Returns:
The following CronColumn to the specified CronColumn, if it exists. Otherwise, returns null.

previous

public static final CronColumn previous(CronColumn column)
Returns the previous CronColumn to the specified CronColumn. CronColumns are ordered.

Parameters:
column - The base CronColumn. The CronColumn immediately preceding the base CronColumn will be returned.
Returns:
The previous CronColumn to the specified CronColumn, if it exists. Otherwise, returns null.

getMaximum

public int getMaximum()
Returns the maximum legal value for the Cron column.

Returns:
The maximum legal value for the Cron column.

getMinimum

public int getMinimum()
Returns the minimum legal value for the Cron column.

Returns:
The minimum legal value for the Cron column.

getName

public java.lang.String getName()
Returns the name of the Cron column.

Returns:
The name of the Cron column.

toString

public java.lang.String toString()
Returns the name of the Cron column.

Overrides:
toString in class java.lang.Object
Returns:
The name of the Cron column.

compareTo

public int compareTo(java.lang.Object o)
Determines whether one enumerated element precedes another.

Specified by:
compareTo in interface java.lang.Comparable
Returns:
Whether one enumerated element precedes another.


© 2014 Flux Corporation. All rights reserved.