|
Primavera Integration API 7.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.primavera.common.value.DetailedWorkHours
public class DetailedWorkHours
This value type is used to define work-time for a particular day. The resolution is 30 minutes (half an hour)
Field Summary | |
---|---|
static long |
WORKTIME_1_TO_5
The default work-time map: 13:00-16:59 |
static long |
WORKTIME_8_TO_12
The default work-time map: 8:00-11:59 |
static long |
WORKTIME_8_TO_12_AND_1_TO_5
The default work-time map: 8:00-11:59 and 13:00-16:59 |
static long |
WORKTIME_8_TO_5
The default work-time map: 8:00-16:59 |
static long |
WORKTIME_9_TO_12_AND_1_TO_5
The default work-time map: 9:00-11:59 and 13:00-16:59 |
static long |
WORKTIME_9_TO_5
The default work-time map: 9:00am-16:59 |
Constructor Summary | |
---|---|
DetailedWorkHours(long lTimeMap)
Constructs a DetailedWorkHours object with the given long time list. |
|
DetailedWorkHours(java.lang.String sTimeList)
Constructs a DetailedWorkHours object with the given String time list. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object parm1)
Compares this object against the specified object. |
double |
getFinishTime()
Gets the finish of the work time |
double |
getStartTime()
Gets the start of the work time |
long |
getTimeBitmapAsLong()
Gets a time map value for this object |
static long |
getTimeBitmapAsLong(double dStartIndex,
double dEndIndex)
Gets a time map value with given time range . |
static long |
getTimeBitmapAsLong(java.lang.String sStartTime,
java.lang.String sEndTime)
Gets a time map value for the given time range |
java.lang.String |
getTimeBitmapAsString()
Gets a time bit map as a String for this object . |
java.lang.String |
getTimeString()
Gets a time string for this object. |
double |
getTotalWorkHours()
Gets the total work time in minutes for this object |
int |
hashCode()
Returns a hash code for this object. |
boolean |
isTimeOn(double dIndex)
Indicates if the given time is work-time. |
boolean |
isTimeOn(java.lang.String sTime)
Indicates if the given time is work-time. |
void |
turnTimeOff(double dStartIndex,
double dEndIndex)
Sets the time range to be non-work-time. |
void |
turnTimeOff(java.lang.String sStartTime,
java.lang.String sEndTime)
Sets the time range to be non-work-time. |
void |
turnTimeOn(double dStartIndex,
double dEndIndex)
Sets the time range to be work-time. |
void |
turnTimeOn(java.lang.String sStartTime,
java.lang.String sEndTime)
Sets the time range to be work-time. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long WORKTIME_9_TO_5
public static final long WORKTIME_8_TO_5
public static final long WORKTIME_9_TO_12_AND_1_TO_5
public static final long WORKTIME_8_TO_12_AND_1_TO_5
public static final long WORKTIME_8_TO_12
public static final long WORKTIME_1_TO_5
Constructor Detail |
---|
public DetailedWorkHours(long lTimeMap)
DetailedWorkHours
object with the given long time list.
lTimeMap
- The lower 48 bits of lTimeMap indicate the half hours to be on or off.public DetailedWorkHours(java.lang.String sTimeList) throws ValueObjectException
DetailedWorkHours
object with the given String time list.
sTimeList
- a semicolon-delimited string of work-time that includes the finish
minutes: "0:30-5:29;8:00-11:59;22:00-23:59;"
ValueObjectException
- if the time list is invalidMethod Detail |
---|
public boolean isTimeOn(double dIndex) throws ValueObjectException
dIndex
- - time index, from 0 to 23.5
ValueObjectException
- - if the time index is out of boundspublic boolean isTimeOn(java.lang.String sTime) throws ValueObjectException
sTime
- time value
ValueObjectException
- - if the time value is invalid or the time index is out of
boundspublic void turnTimeOn(double dStartIndex, double dEndIndex) throws ValueObjectException
dStartIndex
- the start time indexdEndIndex
- the end time index
ValueObjectException
- - if one or both time indexes are out of boundspublic void turnTimeOn(java.lang.String sStartTime, java.lang.String sEndTime) throws ValueObjectException
sStartTime
- - the start timesEndTime
- - the end time
ValueObjectException
- - if the time value is invalid or the time index is out of
boundspublic void turnTimeOff(double dStartIndex, double dEndIndex) throws ValueObjectException
dStartIndex
- the start time index, from 0 to 23.5dEndIndex
- the end time index, from 0 to 23.5
ValueObjectException
- - if either or both time indexes are out of boundspublic void turnTimeOff(java.lang.String sStartTime, java.lang.String sEndTime) throws ValueObjectException
sStartTime
- the start timesEndTime
- the end time
ValueObjectException
- if the time value is invalid or the time index is out of
boundspublic static long getTimeBitmapAsLong(double dStartIndex, double dEndIndex) throws ValueObjectException
dStartIndex
- the start time index, from 0 to 23.5dEndIndex
- the end time index, from 0 to 23.5
ValueObjectException
- if either or both time indexes are out of boundspublic static long getTimeBitmapAsLong(java.lang.String sStartTime, java.lang.String sEndTime) throws ValueObjectException
sStartTime
- the start timesEndTime
- the end time
ValueObjectException
- if the time value is invalid or the time index is out of
boundspublic long getTimeBitmapAsLong()
public java.lang.String getTimeBitmapAsString()
public java.lang.String getTimeString()
public double getTotalWorkHours()
public double getStartTime()
public double getFinishTime()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object parm1)
true
if and
only if the argument is not null
and is a DetailedWorkHours
object that has exactly the same time map long value.
equals
in class java.lang.Object
parm1
- the reference object with which to compare.
true
if the day maps equal. false
otherwise.
|
Primavera Integration API 7.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |