-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: Use Java record with @builder for League, Region and Team (…
…hattrickdata)
- Loading branch information
Showing
5 changed files
with
10 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,11 @@ | ||
package hattrickdata; | ||
|
||
import core.util.HODateTime; | ||
import lombok.*; | ||
import lombok.experimental.SuperBuilder; | ||
import lombok.Builder; | ||
|
||
@Getter | ||
@SuperBuilder | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@EqualsAndHashCode | ||
@ToString | ||
public class HattrickDataInfo { | ||
|
||
private String fileName; | ||
private String version; | ||
private int userId; | ||
private HODateTime fetchedDate; | ||
@Builder | ||
public record HattrickDataInfo(String fileName, | ||
String version, | ||
int userId, | ||
HODateTime fetchedDate) { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,7 @@ | ||
package hattrickdata; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.ToString; | ||
|
||
@Getter | ||
@Builder | ||
@AllArgsConstructor | ||
@EqualsAndHashCode | ||
@ToString | ||
public class League { | ||
|
||
private int id; | ||
private String name; | ||
public record League(int id, String name) { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,7 @@ | ||
package hattrickdata; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.ToString; | ||
|
||
@Getter | ||
@Builder | ||
@AllArgsConstructor | ||
@EqualsAndHashCode | ||
@ToString | ||
public class Region { | ||
|
||
private int id; | ||
private String name; | ||
public record Region(int id, String name) { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,7 @@ | ||
package hattrickdata; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.ToString; | ||
|
||
@Getter | ||
@Builder | ||
@AllArgsConstructor | ||
@EqualsAndHashCode | ||
@ToString | ||
public class Team { | ||
|
||
private int id; | ||
private String name; | ||
public record Team(int id, String name) { | ||
} |