mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-18 02:59:19 +00:00
📍Use lombok, reformat, and optimize the code (#1560)
* Use lombok, reformat, and optimize the code * Fix merge conflicts and some sonar issues Co-authored-by: va1m <va1m@email.com>
This commit is contained in:
@@ -24,10 +24,14 @@
|
||||
package com.iluwatar.tolerantreader;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
/**
|
||||
* RainbowFish is the initial schema.
|
||||
*/
|
||||
@Getter
|
||||
@RequiredArgsConstructor
|
||||
public class RainbowFish implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -37,30 +41,4 @@ public class RainbowFish implements Serializable {
|
||||
private final int lengthMeters;
|
||||
private final int weightTons;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
public RainbowFish(String name, int age, int lengthMeters, int weightTons) {
|
||||
this.name = name;
|
||||
this.age = age;
|
||||
this.lengthMeters = lengthMeters;
|
||||
this.weightTons = weightTons;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public int getAge() {
|
||||
return age;
|
||||
}
|
||||
|
||||
public int getLengthMeters() {
|
||||
return lengthMeters;
|
||||
}
|
||||
|
||||
public int getWeightTons() {
|
||||
return weightTons;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user