public class TestControl extends Object implements UtilityControl
Modifier and Type | Field and Description |
---|---|
double |
consumption |
int |
urgency |
int |
utilNumber |
Constructor and Description |
---|
TestControl(int utilNumber) |
Modifier and Type | Method and Description |
---|---|
double |
getConsumptionEstimation()
Runs an estimation on previous data to find the right value.
|
int |
getUrgency()
Creates a schedule and finds the urgency level
|
boolean |
permitUsage(boolean use)
When the function is called the utility starts working or stops,
depending on input
|
boolean |
setConsumption(double consumption) |
boolean |
setUrgency(int urgency) |
public int utilNumber
public double consumption
public int urgency
public boolean permitUsage(boolean use)
UtilityControl
permitUsage
in interface UtilityControl
use
- either gives control (true) or turns it off (false)public int getUrgency()
UtilityControl
getUrgency
in interface UtilityControl
public boolean setUrgency(int urgency)
public double getConsumptionEstimation()
UtilityControl
getConsumptionEstimation
in interface UtilityControl
public boolean setConsumption(double consumption)
Copyright © 2015. All rights reserved.