|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.colorado.simulations.Throttle
public class Throttle
A Throttle object simulates a throttle that is controlling fuel flow.
| Constructor Summary | |
|---|---|
Throttle(int size)
Construct a Throttle with a specified number of "on positions." |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Throttle(int size)
size - the number of "on positions" for this new Throttlejava.lang.IllegalArgumentException - Indicates that size is not positive.| Method Detail |
|---|
public double getFlow()
- - none
public boolean isOn()
- - none
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()
- - none
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||