|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hackystat.dailyprojectdata.resource.devtime.DevTimeCounter
public class DevTimeCounter
Provides a facility for counting up the DevTime associated with a series of timestamps associated with DevEvent sensor data. The DevTimeCounter partitions a day into 288 five minute intervals. If at least one DevEvent timestamp occurs within an interval, that entire five minute interval counts as DevTime. At any time, the getDevTime() method can be called to find the total amount of DevTime accumulated so far. DevTime for a day can range from 0 minutes to 1440 minutes, in five minute increments. Note that the DevTimeCounter looks only at the hours, minutes, and seconds associated with a timestamp. The client is responsible for assuring that all of the timestamps are associated with the same day.
Constructor Summary | |
---|---|
DevTimeCounter()
Create a new DevTimeCounter, initialized to zero DevTime. |
Method Summary | |
---|---|
void |
addDevEvent(javax.xml.datatype.XMLGregorianCalendar timestamp)
Update the DevTimeCounter with a new DevEvent. |
java.math.BigInteger |
getDevTime()
Returns the total DevTime (in minutes, as a multiple of five) associated with this DevTimeCounter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DevTimeCounter()
Method Detail |
---|
public void addDevEvent(javax.xml.datatype.XMLGregorianCalendar timestamp)
timestamp
- The timestamp to add.public java.math.BigInteger getDevTime()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |