public class Throttle
extends java.lang.Object
Constructor and Description |
---|
Throttle(int size)
Construct a Throttle with a specified number of
"on positions."
|
Modifier and Type | Method and Description |
---|---|
double |
getFlow()
Get the current flow of this Throttle.
|
boolean |
isOn()
Check whether this Throttle is on.
|
void |
shift(int amount)
Move this Throttle's position up or down.
|
void |
shutoff()
Turn off this Throttle.
|
public Throttle(int size)
size
- the number of "on positions" for this new Throttlejava.lang.IllegalArgumentException
- Indicates that size is not positive.public double getFlow()
public boolean isOn()
public void shift(int amount)
amount
- the amount to move the position up or down (a positive amount
moves the position up, a negative amount moves it down)public void shutoff()