java.io.Serializablepublic class VacuumTimer
extends java.lang.Object
implements java.io.Serializable
| Constructor | Description |
|---|---|
VacuumTimer(java.lang.String ID,
boolean enabled,
int hour,
int minute,
java.util.HashSet<java.time.DayOfWeek> runDays) |
Create a new vacuum timer object.
|
VacuumTimer(java.lang.String ID,
boolean enabled,
java.time.LocalTime time,
java.util.HashSet<java.time.DayOfWeek> runDays,
org.json.JSONArray job) |
Create a new vacuum timer object.
|
VacuumTimer(org.json.JSONArray timer) |
Generate a new vacuum timer object from the response of a device.
|
| Modifier and Type | Method | Description |
|---|---|---|
org.json.JSONArray |
construct() |
Construct the message the controlling device sends to the vacuum.
|
org.json.JSONArray |
construct(boolean server) |
Construct the message the vacuum sends to the controlling device or the device sends to the vacuum.
|
boolean |
equals(java.lang.Object o) |
|
java.lang.String |
getID() |
|
org.json.JSONArray |
getJob() |
|
java.lang.String |
getOnOff() |
|
java.util.Set<java.time.DayOfWeek> |
getRunDays() |
|
java.time.LocalTime |
getTime() |
|
int |
hashCode() |
|
boolean |
isEnabled() |
|
void |
setEnabled(boolean enabled) |
|
void |
setJob(org.json.JSONArray job) |
|
java.lang.String |
toString() |
public VacuumTimer(java.lang.String ID,
boolean enabled,
java.time.LocalTime time,
java.util.HashSet<java.time.DayOfWeek> runDays,
org.json.JSONArray job)
ID - The timer ID. If null a new DI will be created from the current system time.enabled - Whether the timer is enabled.time - The time to start the job.runDays - The days to run the job at. If null or an empty set, it will be run every day.job - The job description.public VacuumTimer(java.lang.String ID,
boolean enabled,
int hour,
int minute,
java.util.HashSet<java.time.DayOfWeek> runDays)
ID - The timer ID. If null a new DI will be created from the current system time.enabled - Whether the timer is enabled.hour - The hour to start the job.minute - The minute to start the job at.runDays - The days to run the job at. If null or an empty set, it will be run every day.public VacuumTimer(org.json.JSONArray timer)
throws CommandExecutionException
timer - The response to parse.CommandExecutionException - WHen the response was invalid.public org.json.JSONArray construct()
public org.json.JSONArray construct(boolean server)
server - True if the constructed message is in the format from vacuum to controlling device.public java.lang.String getID()
public boolean isEnabled()
public java.lang.String getOnOff()
public void setEnabled(boolean enabled)
enabled - Whether the timer is enabled.public java.time.LocalTime getTime()
public java.util.Set<java.time.DayOfWeek> getRunDays()
public org.json.JSONArray getJob()
public void setJob(org.json.JSONArray job)
job - The job description.public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2018. All rights reserved.