refactor(hw-03): move fields to end of classes
This commit is contained in:
@@ -2,9 +2,6 @@ package org.example.builder;
|
|||||||
|
|
||||||
/** Product */
|
/** Product */
|
||||||
public class Product {
|
public class Product {
|
||||||
private final String first;
|
|
||||||
private final String second;
|
|
||||||
private final int third;
|
|
||||||
|
|
||||||
public Product(String first, String second, int third) {
|
public Product(String first, String second, int third) {
|
||||||
this.first = first;
|
this.first = first;
|
||||||
@@ -37,4 +34,8 @@ public class Product {
|
|||||||
+ third
|
+ third
|
||||||
+ '}';
|
+ '}';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private final String first;
|
||||||
|
private final String second;
|
||||||
|
private final int third;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,9 +2,6 @@ package org.example.builder;
|
|||||||
|
|
||||||
/** Builder */
|
/** Builder */
|
||||||
public class ProductBuilder {
|
public class ProductBuilder {
|
||||||
private String first;
|
|
||||||
private String second;
|
|
||||||
private int third;
|
|
||||||
|
|
||||||
public ProductBuilder setFirst(String first) {
|
public ProductBuilder setFirst(String first) {
|
||||||
this.first = first;
|
this.first = first;
|
||||||
@@ -24,4 +21,8 @@ public class ProductBuilder {
|
|||||||
public Product build() {
|
public Product build() {
|
||||||
return new Product(first, second, third);
|
return new Product(first, second, third);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String first;
|
||||||
|
private String second;
|
||||||
|
private int third;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package org.example.chain;
|
|||||||
|
|
||||||
/** Abstract Handler */
|
/** Abstract Handler */
|
||||||
public abstract class AbstractHandler implements Handler {
|
public abstract class AbstractHandler implements Handler {
|
||||||
private Handler next;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setNext(Handler handler) {
|
public void setNext(Handler handler) {
|
||||||
@@ -14,4 +13,6 @@ public abstract class AbstractHandler implements Handler {
|
|||||||
next.handle(request);
|
next.handle(request);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Handler next;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user