flux
Interface CronSlice

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
Cron, CronForLoop, CronOr

public interface CronSlice
extends java.io.Serializable

Represents a contiguous subset of Cron columns. By default, all legal values are represented in each Cron column. The first method call to add() or addAll() replaces the default values with the values specified in the add() or addAll() method call.

Author:
Copyright 2014 Flux Corporation. All rights reserved.

Method Summary
 void add(CronColumn column, int value)
          Adds a value in a particular Cron column.
 void add(CronColumn column, int start, int end)
          Adds a range of values in a particular Cron column.
 void add(CronColumn column, int start, int end, int stepValue)
          Adds a range of values in a particular Cron column.
 void add(CronColumn column, java.lang.String value)
          Adds a value in a particular Cron column.
 void add(CronColumn column, java.lang.String start, java.lang.String end)
          Adds a range of values in a particular Cron column.
 void add(CronColumn column, java.lang.String start, java.lang.String end, int stepValue)
          Adds a range of values in a particular Cron column.
 void addAll(CronColumn column)
          Adds all of the values in a particular Cron column.
 void addAll(CronColumn column, int stepValue)
          Adds the values in a particular Cron column, starting with the minimum allowed value.
 java.util.List get(CronColumn column)
          Returns a sorted set of elements representing the included values of the selected column.
 CronColumn getEndingCronColumn()
          Returns the ending Cron column for this Cron slice.
 CronColumn getStartingCronColumn()
          Returns the starting Cron column for this Cron slice.
 boolean includesAllValues(CronColumn column)
          Indicates whether the specified Cron column contains all possible values.
 

Method Detail

add

void add(CronColumn column,
         int value)
Adds a value in a particular Cron column.

Parameters:
column - The column to which these values are added.
value - The value to add.
Throws:
java.lang.IllegalArgumentException - If the Cron column is outside of the accepted range of this CronSlice of if value is outside of the range accepted by the Cron column.

add

void add(CronColumn column,
         int start,
         int end)
Adds a range of values in a particular Cron column.

Parameters:
column - The column to which these values are added.
start - The starting value in the range to add.
end - The ending value in the range to add.
Throws:
java.lang.IllegalArgumentException - If the Cron column is outside of the accepted range of this CronSlice, if the start or end values are outside of the range accepted by the Cron column, or if end precedes start.

add

void add(CronColumn column,
         int start,
         int end,
         int stepValue)
Adds a range of values in a particular Cron column.

Parameters:
column - The column to which these values are added.
start - The starting value in the range to add.
end - The ending value in the range to add.
stepValue - The increment used to skip over certain Cron column values.
Throws:
java.lang.IllegalArgumentException - If the Cron column is outside of the accepted range of this CronSlice, if the start or end values are outside of the range accepted by the Cron column, if end precedes start, or if stepValue is less than 1.

add

void add(CronColumn column,
         java.lang.String value)
Adds a value in a particular Cron column.

Parameters:
column - The column to which these values are added.
value - The value to add.
Throws:
java.lang.IllegalArgumentException - If the Cron column is outside of the accepted range of this CronSlice of if value is outside of the range accepted by the Cron column.

add

void add(CronColumn column,
         java.lang.String start,
         java.lang.String end)
Adds a range of values in a particular Cron column.

Parameters:
column - The column to which these values are added.
start - The starting value in the range to add.
end - The ending value in the range to add.
Throws:
java.lang.IllegalArgumentException - If the Cron column is outside of the accepted range of this CronSlice, if the start or end values are outside of the range accepted by the Cron column, or if end precedes start.

add

void add(CronColumn column,
         java.lang.String start,
         java.lang.String end,
         int stepValue)
Adds a range of values in a particular Cron column.

Parameters:
column - The column to which these values are added.
start - The starting value in the range to add.
end - The ending value in the range to add.
stepValue - The increment used to skip over certain Cron column values.
Throws:
java.lang.IllegalArgumentException - If the Cron column is outside of the accepted range of this CronSlice, if the start or end values are outside of the range accepted by the Cron column, if end precedes start, or if stepValue is less than 1.

addAll

void addAll(CronColumn column)
Adds all of the values in a particular Cron column. For example, if addAll(CronColumn.MILLISECOND) is called, all valid millisecond values, 0 to 999, would be added to the CronSlice.

Parameters:
column - The CronColumn to which these values are added.
Throws:
java.lang.IllegalArgumentException - If the Cron column is outside of the accepted range of this CronSlice.

addAll

void addAll(CronColumn column,
            int stepValue)
Adds the values in a particular Cron column, starting with the minimum allowed value. The specified stepValue skips over certain values. For example, if addAll(CronColumn.HOURS, 3) is called, the values 0, 3, 6, 9, 12, 15, 18, and 21 would be added to the CronSlice.

Parameters:
column - The column to which these values are added.
stepValue - The increment used to skip over certain Cron column values.
Throws:
java.lang.IllegalArgumentException - If the Cron column is outside of the accepted range of this CronSlice or if stepValue is less than 1.

get

java.util.List get(CronColumn column)
Returns a sorted set of elements representing the included values of the selected column. Each item in the list is one element from a Cron column.

For example, if the millisecond column of a Cron string is "1,2,3,10-20/3", the elements in the list would be:

[0] = "1"
[1] = "2"
[2] = "3"
[3] = "10"
[4] = "13"
[5] = "16"
[6] = "19"

Parameters:
column - The column from which these values are retreived.
Returns:
List of String. A sorted set of elements representing the included values of the selected column.

getEndingCronColumn

CronColumn getEndingCronColumn()
Returns the ending Cron column for this Cron slice. The ending Cron column is to the right of, or the same as, the starting Cron column.

Returns:
The ending Cron column for this Cron slice.

getStartingCronColumn

CronColumn getStartingCronColumn()
Returns the starting Cron column for this Cron slice. The starting Cron column is to the left of, or the same as, the ending Cron column.

Returns:
The ending Cron column for this Cron slice.

includesAllValues

boolean includesAllValues(CronColumn column)
Indicates whether the specified Cron column contains all possible values. Typically, a "*" symbol is used to represent a Cron column that contains all possible values.

Returns:
Whether the specified Cron column contains all possible values.


© 2014 Flux Corporation. All rights reserved.