Skip to content

Instantly share code, notes, and snippets.

View xgbuils's full-sized avatar

Xavier Garcia Buils xgbuils

View GitHub Profile
@xgbuils
xgbuils / ClosedGateState.java
Last active December 19, 2017 22:53
State Pattern with dependency injection
class ClosedGateState implements GateState {
private GateState openGateState;
public ClosedGateState() {
}
public void setOpenGateState(GateState openGateState) {
this.openGateState = openGateState
}