Skip to content

Instantly share code, notes, and snippets.

@sormuras
Created June 27, 2013 07:47
Show Gist options
  • Save sormuras/5874676 to your computer and use it in GitHub Desktop.
Save sormuras/5874676 to your computer and use it in GitHub Desktop.
Commander - Interfacing Prevayler
class AppendChar implements Transaction<Appendable> {
private final char c;
public AppendChar(char c) {
this.c = c;
}
public void executeOn(Appendable prevalentSystem, Date executionTime) {
prevalentSystem.append(c);
}
}
prevayler.execute(new AppendChar('x'));
prevayler.execute(new AppendChar('y'));
prevayler.execute(new AppendChar('z'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment