Skip to content

Commit

Permalink
Corrected spelling mistake in hair type: BOLD -> BALD.
Browse files Browse the repository at this point in the history
  • Loading branch information
iluwatar committed Sep 25, 2014
1 parent d3fbc2e commit 52f0923
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion builder/src/main/java/com/iluwatar/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static void main( String[] args )
System.out.println(warrior);

Hero thief = new HeroBuilder(Profession.THIEF, "Desmond")
.withHairType(HairType.BOLD)
.withHairType(HairType.BALD)
.withWeapon(Weapon.BOW)
.build();
System.out.println(thief);
Expand Down
4 changes: 2 additions & 2 deletions builder/src/main/java/com/iluwatar/HairType.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

public enum HairType {

BOLD, SHORT, CURLY, LONG_STRAIGHT, LONG_CURLY;
BALD, SHORT, CURLY, LONG_STRAIGHT, LONG_CURLY;

@Override
public String toString() {
String s = "";
switch(this) {
case BOLD: s = "bold"; break;
case BALD: s = "bold"; break;
case SHORT: s = "short"; break;
case CURLY: s = "curly"; break;
case LONG_STRAIGHT: s = "long straight"; break;
Expand Down
2 changes: 1 addition & 1 deletion builder/src/main/java/com/iluwatar/Hero.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public String toString() {
sb.append(hairType);
sb.append(" ");
}
sb.append(hairType != HairType.BOLD ? "hair" : "head");
sb.append(hairType != HairType.BALD ? "hair" : "head");
}
if (armor != null) {
sb.append(" wearing ");
Expand Down

0 comments on commit 52f0923

Please sign in to comment.