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

Method work

concurrent/Machina.java:18–25  ·  view source on GitHub ↗
(Machina m)

Source from the content-addressed store, hash-verified

16 private final int id;
17 public Machina(int id) { this.id = id; }
18 public static Machina work(Machina m) {
19 if(!m.state.equals(State.END)){
20 new Nap(0.1);
21 m.state = m.state.step();
22 }
23 System.out.println(m);
24 return m;
25 }
26 @Override public String toString() {
27 return "Machina" + id + ": " +
28 (state.equals(State.END)? "complete" : state);

Callers

nothing calls this directly

Calls 2

stepMethod · 0.80
equalsMethod · 0.45

Tested by

no test coverage detected