public class SleepCycle extends Object
Sleep cycle specifying a start/end time for a scheduled sleep.
Constructor and description |
---|
SleepCycle
(String id, Date sleepTime, Date wakeupTime) Creates a sleep cycle given an id, start time and end time for the scheduled sleep. |
Type Params | Return Type | Name and description |
---|---|---|
|
int |
compareTo(SleepCycle sleepCycle) |
|
String |
getCycleID() Gets the id of the schedule. |
|
Date |
getSleepTime() Gets the sleep time. |
|
Date |
getWakeupTime() Gets the wakeup time. |
|
boolean |
isValid() Checks sleep validity. |
|
String |
toString() |
Gets the id of the schedule.
Gets the sleep time.
Gets the wakeup time.
Checks sleep validity. A sleep is considered valid if the sleep time is before the wakeup time, and the wake up time is in the future.
Copyright 2013-21, Acoustic Research Laboratory, National University of Singapore, and Subnero Pte Ltd