Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/BruceEckel/OnJava8-Examples
/ changeState
Method
changeState
patterns/state/StateMachineDemo.java:17–17 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
15
abstract
class
StateMachine {
16
protected
State currentState;
17
protected
abstract boolean changeState();
18
// Template method:
19
protected
final
void
runAll() {
20
while
(changeState())
Callers
1
runAll
Method · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected