MCPcopy Index your code
hub / github.com/BruceEckel/OnJava8-Examples / LightOn

Class LightOn

innerclasses/GreenhouseControls.java:13–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11public class GreenhouseControls extends Controller {
12 private boolean light = false;
13 public class LightOn extends Event {
14 public LightOn(long delayTime) {
15 super(delayTime);
16 }
17 @Override public void action() {
18 // Put hardware control code here to
19 // physically turn on the light.
20 light = true;
21 }
22 @Override public String toString() {
23 return "Light is on";
24 }
25 }
26 public class LightOff extends Event {
27 public LightOff(long delayTime) {
28 super(delayTime);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected