|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectCOM.FutureTense.Util.TimePattern
public class TimePattern
This class represents a scheduled time, using a syntax similar to the UNIX 'cron' syntax. The format is described as follows:
hh:mm:ss W/DD/MM
| Field Summary | |
|---|---|
static java.lang.String |
IMMEDIATE
TimePattern string representing a pattern that always matches |
static TimePattern |
IMMEDIATE_TIMEPATTERN
TimePattern that matches every instant in time |
static java.lang.String |
NEVER
TimePattern string representing a pattern that will never be matched. |
static TimePattern |
NEVER_TIMEPATTERN
TimePattern that never matches any instant in time |
static java.lang.String |
sImmediate
Deprecated. use IMMEDIATE |
static java.lang.String |
sNever
Deprecated. use NEVER |
| Constructor Summary | |
|---|---|
TimePattern(java.lang.String pattern)
Deprecated. use valueOf(String) instead |
|
| Method Summary | |
|---|---|
static TimePattern |
getTimePattern(java.lang.String tp)
Deprecated. (use valueOf(String) instead) |
boolean |
matches(java.util.Calendar time)
Determines if this TimePattern has had a match between the specified time, and right now. |
boolean |
never()
Return whether this timepattern is designed to never match |
java.util.Calendar |
nextMatch(java.util.Calendar rangeStart,
java.util.Calendar rangeEnd)
Get the next match for this TimePattern between the two dates passed in |
java.util.Date |
nextMatch(java.util.Date rangeStart,
java.util.Date rangeEnd)
Get the next match for this TimePattern between the two dates passed in |
boolean |
now()
Return whether or not this TimePattern matches every instant in time. |
java.lang.String |
toString()
Return the string representation of a time pattern |
static TimePattern |
valueOf(java.lang.String pattern)
Return an instance of a TimePattern object given the input string specified. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String NEVER
public static final java.lang.String IMMEDIATE
public static final java.lang.String sNever
public static final java.lang.String sImmediate
public static final TimePattern NEVER_TIMEPATTERN
public static final TimePattern IMMEDIATE_TIMEPATTERN
| Constructor Detail |
|---|
public TimePattern(java.lang.String pattern)
pattern - time pattern string
java.lang.IllegalArgumentException - if the TimePattern is invalid| Method Detail |
|---|
public static final TimePattern valueOf(java.lang.String pattern)
pattern - TimePattern string
java.lang.IllegalArgumentException - if the pattern specified is
now well-formed.public static final TimePattern getTimePattern(java.lang.String tp)
tp - time pattern string
java.lang.IllegalArgumentException - on invalid datapublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean never()
public boolean now()
public boolean matches(java.util.Calendar time)
time - The last time this TimePattern had a match.
public java.util.Date nextMatch(java.util.Date rangeStart,
java.util.Date rangeEnd)
rangeStart - Find the next match after this daterangeEnd - Find the next match before this match
public java.util.Calendar nextMatch(java.util.Calendar rangeStart,
java.util.Calendar rangeEnd)
rangeStart - Find the next match after this daterangeEnd - Find the next match before this match
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||