added mediator sample

This commit is contained in:
Ilkka Seppala
2014-08-21 20:06:49 +03:00
parent 46408565cd
commit 82f5f88964
12 changed files with 217 additions and 0 deletions

View File

@ -0,0 +1,28 @@
package com.iluwatar;
public enum Action {
HUNT, TALE, GOLD, ENEMY;
public String toString() {
String s = "";
switch (this) {
case ENEMY:
s = "spotted enemies";
break;
case GOLD:
s = "found gold";
break;
case HUNT:
s = "hunted a rabbit";
break;
case TALE:
s = "tells a tale";
break;
default:
break;
}
return s;
};
}