|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--cz.zcu.fav.kiv.jsimcasestudies.watersystem.model.Station
A station object maintains the volume of water in the main tank. It is the data model of the main tank.
Field Summary | |
private double |
currentVolume
Volume of water currently present in the main tank. |
protected static double |
HIGH_VOLUME_LIMIT
The highest possible volume of water in the source, in liters. |
protected static double |
LOW_VOLUME_LIMIT
The lowest possible volume of water in the source, in liters. |
protected static double |
MAX_OUTPUT_FLOW
The maximum output flow in liters per second. |
protected static double |
MAX_OUTPUT_FLOW_CHANGE_PER_SECOND
The maximum change of output flow per one second. |
private SourceHardwareData[] |
sources
Sources' hardware info. |
Constructor Summary | |
protected |
Station(SourceHardwareData[] sources)
Creates a new station object and sets its volume to the exact middle of possible values. |
Method Summary | |
protected void |
decreaseVolume(double delta)
Decreases the volume of water in the tank. |
protected double |
getVolume()
Reports the current volume of water in the tank. |
protected int |
howManyPumpsOn()
Returns the number of pumps currently switched on. |
protected void |
increaseVolume(double delta)
Increases the volume of water in the tank. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final double LOW_VOLUME_LIMIT
protected static final double HIGH_VOLUME_LIMIT
protected static final double MAX_OUTPUT_FLOW
protected static final double MAX_OUTPUT_FLOW_CHANGE_PER_SECOND
private double currentVolume
private SourceHardwareData[] sources
Constructor Detail |
protected Station(SourceHardwareData[] sources)
Method Detail |
protected void increaseVolume(double delta)
delta
- The amount of water that is added to the tank.protected void decreaseVolume(double delta)
delta
- The amount of water that is taken away from the tank.protected double getVolume()
protected int howManyPumpsOn()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |