added builder sample

This commit is contained in:
Ilkka Seppala
2014-08-09 22:38:07 +03:00
parent 959a1f63ba
commit a4b58fe06e
9 changed files with 272 additions and 0 deletions
@@ -0,0 +1,19 @@
package com.iluwatar;
public enum Profession {
WARRIOR, THIEF, MAGE, PRIEST;
@Override
public String toString() {
String s = "";
switch(this) {
case WARRIOR: s = "Warrior"; break;
case THIEF: s = "Thief"; break;
case MAGE: s = "Mage"; break;
case PRIEST: s = "Priest"; break;
}
return s;
}
}