|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectstella.util.ValueToggle
public class ValueToggle
A simple toggle. Oscilates between two states, depending on the value
handed over on construct. If the added value is below the toggle value,
false is returned by the Toggling method.
| Field Summary | |
|---|---|
private double |
toggle
The toggle value. |
| Constructor Summary | |
|---|---|
ValueToggle(double mean)
Constructs a new toggle value. |
|
ValueToggle(String val)
Constructs a new value toggle. |
|
| Method Summary | |
|---|---|
boolean |
addHit(double newval)
Test if the added value is above or below the toggle value. |
String |
toString()
Returns the toggling value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private double toggle
| Constructor Detail |
|---|
public ValueToggle(String val)
public ValueToggle(double mean)
| Method Detail |
|---|
public boolean addHit(double newval)
addHit in interface Togglingpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||