|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opengts.db.WorkHours
public class WorkHours
Nested Class Summary | |
---|---|
static class |
WorkHours.Day
Day |
Field Summary | |
---|---|
static int |
DAYS_IN_WEEK
|
static java.lang.String |
DFT
|
static java.lang.String[] |
DOW_NAME
|
static java.lang.String |
FRI
|
static char |
HOUR_MINUTE_SEPARATOR_CHAR
|
static java.lang.String |
MON
|
static java.lang.String |
PROP_WorkHours_includeHourMinuteSeparator
|
static java.lang.String |
PROP_WorkHours_minuteInterval
|
static java.lang.String |
SAT
|
static java.lang.String |
SUN
|
static java.lang.String |
THU
|
static char |
TIMERANGE_SEPARATOR_CHAR
|
static java.lang.String |
TUE
|
static java.lang.String |
WED
|
Constructor Summary | |
---|---|
WorkHours(RTConfig.PropertyGetter dayRTP)
Constructor |
|
WorkHours(RTConfig.PropertyGetter dayRTP,
java.lang.String keyPrefix)
Constructor |
|
WorkHours(java.lang.String keyPrefix)
Deprecated. (currently only required for legacy ENRE interface) |
|
WorkHours(WorkHours.Day[] day)
Constructor |
Method Summary | |
---|---|
double |
countWorkHours(DateTime startDT,
DateTime stopDT,
java.util.TimeZone tz)
Accumulate all work-hour time between the specified dates |
static java.lang.String |
formatTOD(int tod,
boolean inclSep)
Return formated String for specified time-of-day |
WorkHours.Day |
getDay(DateTime dateTime)
Return the requested Day |
WorkHours.Day |
getDay(DateTime dateTime,
java.util.TimeZone tz)
Return the requested Day |
WorkHours.Day |
getDay(int dow)
Return the requested Day |
WorkHours.Day |
getDay(long timestamp,
java.util.TimeZone tz)
Return the requested Day |
RTProperties |
getProperties()
Returns the WorkHours instance as an RTProperties |
boolean |
isMatch(DateTime dateTime)
True if the specified DateTime is within the current 'WorkingHours' |
boolean |
isMatch(DateTime dateTime,
java.util.TimeZone tz)
True if the specified DateTime is within the current 'WorkingHours' |
boolean |
isMatch(int dow,
int tod)
True if the specified time-of-day is within the current 'WorkingHours' |
boolean |
isMatch(long timestamp,
java.util.TimeZone tz)
True if the specified DateTime is within the current 'WorkingHours' |
static void |
main(java.lang.String[] argv)
|
java.lang.String |
toString()
Returns a String repreentation of this instance |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int DAYS_IN_WEEK
public static final java.lang.String DFT
public static final java.lang.String SUN
public static final java.lang.String MON
public static final java.lang.String TUE
public static final java.lang.String WED
public static final java.lang.String THU
public static final java.lang.String FRI
public static final java.lang.String SAT
public static final java.lang.String[] DOW_NAME
public static final java.lang.String PROP_WorkHours_minuteInterval
public static final java.lang.String PROP_WorkHours_includeHourMinuteSeparator
public static final char TIMERANGE_SEPARATOR_CHAR
public static final char HOUR_MINUTE_SEPARATOR_CHAR
Constructor Detail |
---|
public WorkHours(WorkHours.Day[] day)
public WorkHours(RTConfig.PropertyGetter dayRTP)
public WorkHours(RTConfig.PropertyGetter dayRTP, java.lang.String keyPrefix)
@Deprecated public WorkHours(java.lang.String keyPrefix)
keyPrefix
- Property key prefixMethod Detail |
---|
public static java.lang.String formatTOD(int tod, boolean inclSep)
public WorkHours.Day getDay(int dow)
public WorkHours.Day getDay(DateTime dateTime)
public WorkHours.Day getDay(DateTime dateTime, java.util.TimeZone tz)
public WorkHours.Day getDay(long timestamp, java.util.TimeZone tz)
public boolean isMatch(DateTime dateTime)
public boolean isMatch(DateTime dateTime, java.util.TimeZone tz)
public boolean isMatch(long timestamp, java.util.TimeZone tz)
public boolean isMatch(int dow, int tod)
public double countWorkHours(DateTime startDT, DateTime stopDT, java.util.TimeZone tz)
public RTProperties getProperties()
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] argv)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |