mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-15 06:58:41 +00:00
Code cleanup (#1461)
* Code cleanup * Fix flux tests * Fix checkstyle errors * Fix compile error
This commit is contained in:
@@ -30,7 +30,7 @@ public enum Fatigue {
|
||||
|
||||
ALERT("alert"), TIRED("tired"), SLEEPING("sleeping");
|
||||
|
||||
private String title;
|
||||
private final String title;
|
||||
|
||||
Fatigue(String title) {
|
||||
this.title = title;
|
||||
|
||||
+2
-2
@@ -28,8 +28,8 @@ package com.iluwatar.model.view.controller;
|
||||
*/
|
||||
public class GiantController {
|
||||
|
||||
private GiantModel giant;
|
||||
private GiantView view;
|
||||
private final GiantModel giant;
|
||||
private final GiantView view;
|
||||
|
||||
public GiantController(GiantModel giant, GiantView view) {
|
||||
this.giant = giant;
|
||||
|
||||
@@ -30,7 +30,7 @@ public enum Health {
|
||||
|
||||
HEALTHY("healthy"), WOUNDED("wounded"), DEAD("dead");
|
||||
|
||||
private String title;
|
||||
private final String title;
|
||||
|
||||
Health(String title) {
|
||||
this.title = title;
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ public enum Nourishment {
|
||||
|
||||
SATURATED("saturated"), HUNGRY("hungry"), STARVING("starving");
|
||||
|
||||
private String title;
|
||||
private final String title;
|
||||
|
||||
Nourishment(String title) {
|
||||
this.title = title;
|
||||
|
||||
Reference in New Issue
Block a user