public class CronHoursEntry extends Object
isValid()
method refers only to what is supported by the cron editor for the hours entry.
Valid hours means a numerical hour (or range of the form x-y) with an optional trailing "/1", "/2" or "/3" to
indicate the repeat increment in hours. This expects that numeric hours to be in 24 hour time format.
The hours and meridian attributes depend on whether this is a range entry or a "run once" entry. For ranges, use
the "from" and "to" methods.Constructor and Description |
---|
CronHoursEntry(String cronEntry)
Parses the given value and establishes state based on this.
|
Modifier and Type | Method and Description |
---|---|
int |
getFrom()
Returns the lower bound of the hour range if this entry has a range.
|
String |
getFromMeridian()
Returns the meridian indicator @{link #AM} or @{link #AM} for the lower bound of a range entry.
|
int |
getIncrement()
Returns the increment or step size in hours or -1 if this entry has no increment.
|
int |
getRunOnce()
Returns the single hour value for this entry if it is a run once entry.
|
String |
getRunOnceMeridian()
Returns the meridian indicator @{link #AM} or @{link #AM} for the entry if it is a run once entry.
|
int |
getTo()
Returns the upper bound of the hour range if this entry has a range.
|
String |
getToMeridian()
Returns the meridian indicator @{link #AM} or @{link #AM} for the upper bound of a range entry.
|
boolean |
hasIncrement()
Indicates if this entry has an increment.
|
boolean |
isRunOnce() |
boolean |
isValid()
Returns true only if the hours entry is valid with respect to the editor.
|
public CronHoursEntry(String cronEntry)
cronEntry
- the hours field of a cron string.public boolean isValid()
public int getFrom()
public int getTo()
public String getFromMeridian()
public String getToMeridian()
public int getRunOnce()
public String getRunOnceMeridian()
public int getIncrement()
public boolean hasIncrement()
public boolean isRunOnce()
Copyright © 2002-2016 Atlassian. All Rights Reserved.