Class AbstractWeatherDevice
- java.lang.Object
-
- cz.cvut.fel.omo.SmartHome.devices.AbstractDevice
-
- cz.cvut.fel.omo.SmartHome.devices.weather.AbstractWeatherDevice
-
- All Implemented Interfaces:
TurnableDevicesInterface
- Direct Known Subclasses:
InsideBlinds
,OutsideBlinds
,SplitSystem
public abstract class AbstractWeatherDevice extends AbstractDevice implements TurnableDevicesInterface
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
isBroken
protected AbstractWeatherDeviceState
state
private int
timeUntilRepair
private WeatherDeviceSetUp
weatherDeviceSetUp
-
Fields inherited from class cz.cvut.fel.omo.SmartHome.devices.AbstractDevice
condition, consumption, deviceName, floor, instruction
-
-
Constructor Summary
Constructors Constructor Description AbstractWeatherDevice(Floor floor, java.lang.String deviceName, Consumption consumption, WeatherDeviceSetUp weatherDeviceSetUp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
consume()
Method calculating consuming of device.void
newSetUp(WeatherDeviceSetUp weatherDeviceSetUp)
Method that is used for changing weather devices settings.void
processChanges()
Method that process outside changes depending on the current state-
Methods inherited from class cz.cvut.fel.omo.SmartHome.devices.AbstractDevice
consumes, isBroken, isEntertaining, repairDevice
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface cz.cvut.fel.omo.SmartHome.devices.TurnableDevicesInterface
turnOff, turnOn
-
-
-
-
Field Detail
-
state
protected AbstractWeatherDeviceState state
-
timeUntilRepair
private int timeUntilRepair
-
isBroken
private boolean isBroken
-
weatherDeviceSetUp
private WeatherDeviceSetUp weatherDeviceSetUp
-
-
Constructor Detail
-
AbstractWeatherDevice
public AbstractWeatherDevice(Floor floor, java.lang.String deviceName, Consumption consumption, WeatherDeviceSetUp weatherDeviceSetUp)
-
-
Method Detail
-
processChanges
public void processChanges()
Method that process outside changes depending on the current state
-
consume
public void consume()
Description copied from class:AbstractDevice
Method calculating consuming of device.- Specified by:
consume
in classAbstractDevice
-
newSetUp
public void newSetUp(WeatherDeviceSetUp weatherDeviceSetUp)
Method that is used for changing weather devices settings.- Parameters:
weatherDeviceSetUp
- dto
-
-