File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
builder/src/main/java/com/iluwatar/builder
property/src/main/java/com/iluwatar/property
step-builder/src/main/java/com/iluwatar/stepbuilder Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -71,10 +71,10 @@ public String toString() {
7171 if (hairColor != null || hairType != null ) {
7272 sb .append (" with " );
7373 if (hairColor != null ) {
74- sb .append (hairColor ).append (" " );
74+ sb .append (hairColor ).append (' ' );
7575 }
7676 if (hairType != null ) {
77- sb .append (hairType ).append (" " );
77+ sb .append (hairType ).append (' ' );
7878 }
7979 sb .append (hairType != HairType .BALD ? "hair" : "head" );
8080 }
@@ -84,7 +84,7 @@ public String toString() {
8484 if (weapon != null ) {
8585 sb .append (" and wielding a " ).append (weapon );
8686 }
87- sb .append ("." );
87+ sb .append ('.' );
8888 return sb .toString ();
8989 }
9090
Original file line number Diff line number Diff line change @@ -114,11 +114,11 @@ public void remove(Stats stat) {
114114 public String toString () {
115115 StringBuilder builder = new StringBuilder ();
116116 if (name != null ) {
117- builder .append ("Player: " ).append (name ).append (" \n " );
117+ builder .append ("Player: " ).append (name ).append ('\n' );
118118 }
119119
120120 if (type != null ) {
121- builder .append ("Character type: " ).append (type .name ()).append (" \n " );
121+ builder .append ("Character type: " ).append (type .name ()).append ('\n' );
122122 }
123123
124124 builder .append ("Stats:\n " );
@@ -127,7 +127,7 @@ public String toString() {
127127 if (value == null ) {
128128 continue ;
129129 }
130- builder .append (" - " ).append (stat .name ()).append (":" ).append (value ).append (" \n " );
130+ builder .append (" - " ).append (stat .name ()).append (':' ).append (value ).append ('\n' );
131131 }
132132 return builder .toString ();
133133 }
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ public String toString() {
9898 .append (" armed with a " )
9999 .append (weapon != null ? weapon : spell != null ? spell : "with nothing" )
100100 .append (abilities != null ? (" and wielding " + abilities + " abilities" ) : "" )
101- .append ("." );
101+ .append ('.' );
102102 return sb .toString ();
103103 }
104104}
You can’t perform that action at this time.
0 commit comments