Code cleanup (#1461)
* Code cleanup * Fix flux tests * Fix checkstyle errors * Fix compile error
This commit is contained in:
@ -33,11 +33,11 @@ import com.iluwatar.specification.property.Size;
|
||||
*/
|
||||
public abstract class AbstractCreature implements Creature {
|
||||
|
||||
private String name;
|
||||
private Size size;
|
||||
private Movement movement;
|
||||
private Color color;
|
||||
private Mass mass;
|
||||
private final String name;
|
||||
private final Size size;
|
||||
private final Movement movement;
|
||||
private final Color color;
|
||||
private final Mass mass;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
|
@ -30,7 +30,7 @@ public enum Color {
|
||||
|
||||
DARK("dark"), LIGHT("light"), GREEN("green"), RED("red");
|
||||
|
||||
private String title;
|
||||
private final String title;
|
||||
|
||||
Color(String title) {
|
||||
this.title = title;
|
||||
|
@ -28,8 +28,8 @@ package com.iluwatar.specification.property;
|
||||
*/
|
||||
public class Mass {
|
||||
|
||||
private double value;
|
||||
private String title;
|
||||
private final double value;
|
||||
private final String title;
|
||||
|
||||
public Mass(double value) {
|
||||
this.value = value;
|
||||
|
@ -30,7 +30,7 @@ public enum Movement {
|
||||
|
||||
WALKING("walking"), SWIMMING("swimming"), FLYING("flying");
|
||||
|
||||
private String title;
|
||||
private final String title;
|
||||
|
||||
Movement(String title) {
|
||||
this.title = title;
|
||||
|
@ -30,7 +30,7 @@ public enum Size {
|
||||
|
||||
SMALL("small"), NORMAL("normal"), LARGE("large");
|
||||
|
||||
private String title;
|
||||
private final String title;
|
||||
|
||||
Size(String title) {
|
||||
this.title = title;
|
||||
|
@ -30,7 +30,7 @@ import java.util.List;
|
||||
*/
|
||||
public class ConjunctionSelector<T> extends AbstractSelector<T> {
|
||||
|
||||
private List<AbstractSelector<T>> leafComponents;
|
||||
private final List<AbstractSelector<T>> leafComponents;
|
||||
|
||||
@SafeVarargs
|
||||
ConjunctionSelector(AbstractSelector<T>... selectors) {
|
||||
|
@ -30,7 +30,7 @@ import java.util.List;
|
||||
*/
|
||||
public class DisjunctionSelector<T> extends AbstractSelector<T> {
|
||||
|
||||
private List<AbstractSelector<T>> leafComponents;
|
||||
private final List<AbstractSelector<T>> leafComponents;
|
||||
|
||||
@SafeVarargs
|
||||
DisjunctionSelector(AbstractSelector<T>... selectors) {
|
||||
|
@ -30,7 +30,7 @@ package com.iluwatar.specification.selector;
|
||||
*/
|
||||
public class NegationSelector<T> extends AbstractSelector<T> {
|
||||
|
||||
private AbstractSelector<T> component;
|
||||
private final AbstractSelector<T> component;
|
||||
|
||||
NegationSelector(AbstractSelector<T> selector) {
|
||||
this.component = selector;
|
||||
|
Reference in New Issue
Block a user