From 57f16d1de35a1b921be03572c2dc1ba1ec1aff0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Lino?= Date: Tue, 26 Jul 2022 16:39:07 +0200 Subject: [PATCH] fix reference package --- .../example/scoreboard/{reference => }/api/IMatch.java | 2 +- .../example/scoreboard/{reference => }/api/IScore.java | 2 +- .../scoreboard/{reference => }/api/IScoreboard.java | 2 +- .../example/scoreboard/{reference => }/api/ITeam.java | 2 +- .../{reference => }/generic/AbstractMatch.java | 8 ++++---- .../{reference => }/generic/AbstractScore.java | 4 ++-- .../{reference => }/generic/AbstractScoreboard.java | 10 +++++----- .../{reference => }/generic/AbstractTeam.java | 4 ++-- .../java/org/example/scoreboard/reference/Match.java | 10 ++++++++++ .../scoreboard/reference/{reference => }/Score.java | 4 ++-- .../org/example/scoreboard/reference/Scoreboard.java | 9 +++++++++ .../java/org/example/scoreboard/reference/Team.java | 9 +++++++++ .../example/scoreboard/reference/reference/Match.java | 10 ---------- .../scoreboard/reference/reference/Scoreboard.java | 9 --------- .../example/scoreboard/reference/reference/Team.java | 9 --------- .../example/scoreboard/reference/TestScoreboard.java | 8 ++------ 16 files changed, 49 insertions(+), 53 deletions(-) rename src/main/java/org/example/scoreboard/{reference => }/api/IMatch.java (87%) rename src/main/java/org/example/scoreboard/{reference => }/api/IScore.java (52%) rename src/main/java/org/example/scoreboard/{reference => }/api/IScoreboard.java (96%) rename src/main/java/org/example/scoreboard/{reference => }/api/ITeam.java (65%) rename src/main/java/org/example/scoreboard/{reference => }/generic/AbstractMatch.java (92%) rename src/main/java/org/example/scoreboard/{reference => }/generic/AbstractScore.java (77%) rename src/main/java/org/example/scoreboard/{reference => }/generic/AbstractScoreboard.java (89%) rename src/main/java/org/example/scoreboard/{reference => }/generic/AbstractTeam.java (79%) create mode 100644 src/main/java/org/example/scoreboard/reference/Match.java rename src/main/java/org/example/scoreboard/reference/{reference => }/Score.java (54%) create mode 100644 src/main/java/org/example/scoreboard/reference/Scoreboard.java create mode 100644 src/main/java/org/example/scoreboard/reference/Team.java delete mode 100644 src/main/java/org/example/scoreboard/reference/reference/Match.java delete mode 100644 src/main/java/org/example/scoreboard/reference/reference/Scoreboard.java delete mode 100644 src/main/java/org/example/scoreboard/reference/reference/Team.java diff --git a/src/main/java/org/example/scoreboard/reference/api/IMatch.java b/src/main/java/org/example/scoreboard/api/IMatch.java similarity index 87% rename from src/main/java/org/example/scoreboard/reference/api/IMatch.java rename to src/main/java/org/example/scoreboard/api/IMatch.java index a0912d0..a331401 100644 --- a/src/main/java/org/example/scoreboard/reference/api/IMatch.java +++ b/src/main/java/org/example/scoreboard/api/IMatch.java @@ -1,4 +1,4 @@ -package org.example.scoreboard.reference.api; +package org.example.scoreboard.api; import java.util.Date; import java.util.UUID; diff --git a/src/main/java/org/example/scoreboard/reference/api/IScore.java b/src/main/java/org/example/scoreboard/api/IScore.java similarity index 52% rename from src/main/java/org/example/scoreboard/reference/api/IScore.java rename to src/main/java/org/example/scoreboard/api/IScore.java index 90cf15a..98aaf70 100644 --- a/src/main/java/org/example/scoreboard/reference/api/IScore.java +++ b/src/main/java/org/example/scoreboard/api/IScore.java @@ -1,4 +1,4 @@ -package org.example.scoreboard.reference.api; +package org.example.scoreboard.api; public interface IScore { Integer getGoals(); diff --git a/src/main/java/org/example/scoreboard/reference/api/IScoreboard.java b/src/main/java/org/example/scoreboard/api/IScoreboard.java similarity index 96% rename from src/main/java/org/example/scoreboard/reference/api/IScoreboard.java rename to src/main/java/org/example/scoreboard/api/IScoreboard.java index a2a67fc..1abe657 100644 --- a/src/main/java/org/example/scoreboard/reference/api/IScoreboard.java +++ b/src/main/java/org/example/scoreboard/api/IScoreboard.java @@ -1,4 +1,4 @@ -package org.example.scoreboard.reference.api; +package org.example.scoreboard.api; import java.security.InvalidParameterException; import java.util.ArrayList; diff --git a/src/main/java/org/example/scoreboard/reference/api/ITeam.java b/src/main/java/org/example/scoreboard/api/ITeam.java similarity index 65% rename from src/main/java/org/example/scoreboard/reference/api/ITeam.java rename to src/main/java/org/example/scoreboard/api/ITeam.java index f94ed48..96d1862 100644 --- a/src/main/java/org/example/scoreboard/reference/api/ITeam.java +++ b/src/main/java/org/example/scoreboard/api/ITeam.java @@ -1,4 +1,4 @@ -package org.example.scoreboard.reference.api; +package org.example.scoreboard.api; import java.util.UUID; diff --git a/src/main/java/org/example/scoreboard/reference/generic/AbstractMatch.java b/src/main/java/org/example/scoreboard/generic/AbstractMatch.java similarity index 92% rename from src/main/java/org/example/scoreboard/reference/generic/AbstractMatch.java rename to src/main/java/org/example/scoreboard/generic/AbstractMatch.java index 5d7d60a..c5804e6 100644 --- a/src/main/java/org/example/scoreboard/reference/generic/AbstractMatch.java +++ b/src/main/java/org/example/scoreboard/generic/AbstractMatch.java @@ -1,8 +1,8 @@ -package org.example.scoreboard.reference.generic; +package org.example.scoreboard.generic; -import org.example.scoreboard.reference.api.IMatch; -import org.example.scoreboard.reference.api.IScore; -import org.example.scoreboard.reference.api.ITeam; +import org.example.scoreboard.api.IMatch; +import org.example.scoreboard.api.IScore; +import org.example.scoreboard.api.ITeam; import java.util.Date; import java.util.UUID; diff --git a/src/main/java/org/example/scoreboard/reference/generic/AbstractScore.java b/src/main/java/org/example/scoreboard/generic/AbstractScore.java similarity index 77% rename from src/main/java/org/example/scoreboard/reference/generic/AbstractScore.java rename to src/main/java/org/example/scoreboard/generic/AbstractScore.java index dd9ceb9..8d5ba71 100644 --- a/src/main/java/org/example/scoreboard/reference/generic/AbstractScore.java +++ b/src/main/java/org/example/scoreboard/generic/AbstractScore.java @@ -1,6 +1,6 @@ -package org.example.scoreboard.reference.generic; +package org.example.scoreboard.generic; -import org.example.scoreboard.reference.api.IScore; +import org.example.scoreboard.api.IScore; public abstract class AbstractScore implements IScore { private final Integer goals; diff --git a/src/main/java/org/example/scoreboard/reference/generic/AbstractScoreboard.java b/src/main/java/org/example/scoreboard/generic/AbstractScoreboard.java similarity index 89% rename from src/main/java/org/example/scoreboard/reference/generic/AbstractScoreboard.java rename to src/main/java/org/example/scoreboard/generic/AbstractScoreboard.java index 4643f10..d493d2a 100644 --- a/src/main/java/org/example/scoreboard/reference/generic/AbstractScoreboard.java +++ b/src/main/java/org/example/scoreboard/generic/AbstractScoreboard.java @@ -1,9 +1,9 @@ -package org.example.scoreboard.reference.generic; +package org.example.scoreboard.generic; -import org.example.scoreboard.reference.api.IMatch; -import org.example.scoreboard.reference.api.IScore; -import org.example.scoreboard.reference.api.IScoreboard; -import org.example.scoreboard.reference.api.ITeam; +import org.example.scoreboard.api.IMatch; +import org.example.scoreboard.api.IScore; +import org.example.scoreboard.api.IScoreboard; +import org.example.scoreboard.api.ITeam; import java.security.InvalidParameterException; import java.util.ArrayList; diff --git a/src/main/java/org/example/scoreboard/reference/generic/AbstractTeam.java b/src/main/java/org/example/scoreboard/generic/AbstractTeam.java similarity index 79% rename from src/main/java/org/example/scoreboard/reference/generic/AbstractTeam.java rename to src/main/java/org/example/scoreboard/generic/AbstractTeam.java index 0d904d1..c9e0034 100644 --- a/src/main/java/org/example/scoreboard/reference/generic/AbstractTeam.java +++ b/src/main/java/org/example/scoreboard/generic/AbstractTeam.java @@ -1,6 +1,6 @@ -package org.example.scoreboard.reference.generic; +package org.example.scoreboard.generic; -import org.example.scoreboard.reference.api.ITeam; +import org.example.scoreboard.api.ITeam; import java.util.UUID; diff --git a/src/main/java/org/example/scoreboard/reference/Match.java b/src/main/java/org/example/scoreboard/reference/Match.java new file mode 100644 index 0000000..a74eb3f --- /dev/null +++ b/src/main/java/org/example/scoreboard/reference/Match.java @@ -0,0 +1,10 @@ +package org.example.scoreboard.reference; + +import org.example.scoreboard.api.ITeam; +import org.example.scoreboard.generic.AbstractMatch; + +public class Match extends AbstractMatch { + public Match(ITeam homeTeam, ITeam awayTeam) { + super(Score::new, homeTeam, awayTeam); + } +} diff --git a/src/main/java/org/example/scoreboard/reference/reference/Score.java b/src/main/java/org/example/scoreboard/reference/Score.java similarity index 54% rename from src/main/java/org/example/scoreboard/reference/reference/Score.java rename to src/main/java/org/example/scoreboard/reference/Score.java index 8ab2337..0b9e685 100644 --- a/src/main/java/org/example/scoreboard/reference/reference/Score.java +++ b/src/main/java/org/example/scoreboard/reference/Score.java @@ -1,6 +1,6 @@ -package org.example.scoreboard.reference.reference; +package org.example.scoreboard.reference; -import org.example.scoreboard.reference.generic.AbstractScore; +import org.example.scoreboard.generic.AbstractScore; public class Score extends AbstractScore { public Score() { diff --git a/src/main/java/org/example/scoreboard/reference/Scoreboard.java b/src/main/java/org/example/scoreboard/reference/Scoreboard.java new file mode 100644 index 0000000..8b1935b --- /dev/null +++ b/src/main/java/org/example/scoreboard/reference/Scoreboard.java @@ -0,0 +1,9 @@ +package org.example.scoreboard.reference; + +import org.example.scoreboard.generic.AbstractScoreboard; + +public class Scoreboard extends AbstractScoreboard { + public Scoreboard() { + super(Match::new); + } +} diff --git a/src/main/java/org/example/scoreboard/reference/Team.java b/src/main/java/org/example/scoreboard/reference/Team.java new file mode 100644 index 0000000..0b74d9c --- /dev/null +++ b/src/main/java/org/example/scoreboard/reference/Team.java @@ -0,0 +1,9 @@ +package org.example.scoreboard.reference; + +import org.example.scoreboard.generic.AbstractTeam; + +public class Team extends AbstractTeam { + public Team(String name) { + super(name); + } +} diff --git a/src/main/java/org/example/scoreboard/reference/reference/Match.java b/src/main/java/org/example/scoreboard/reference/reference/Match.java deleted file mode 100644 index 92c6533..0000000 --- a/src/main/java/org/example/scoreboard/reference/reference/Match.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.example.scoreboard.reference.reference; - -import org.example.scoreboard.reference.api.ITeam; -import org.example.scoreboard.reference.generic.AbstractMatch; - -public class Match extends AbstractMatch { - public Match(ITeam homeTeam, ITeam awayTeam) { - super(Score::new, homeTeam, awayTeam); - } -} diff --git a/src/main/java/org/example/scoreboard/reference/reference/Scoreboard.java b/src/main/java/org/example/scoreboard/reference/reference/Scoreboard.java deleted file mode 100644 index 64ba549..0000000 --- a/src/main/java/org/example/scoreboard/reference/reference/Scoreboard.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.example.scoreboard.reference.reference; - -import org.example.scoreboard.reference.generic.AbstractScoreboard; - -public class Scoreboard extends AbstractScoreboard { - public Scoreboard() { - super(Match::new); - } -} diff --git a/src/main/java/org/example/scoreboard/reference/reference/Team.java b/src/main/java/org/example/scoreboard/reference/reference/Team.java deleted file mode 100644 index 2fa87e1..0000000 --- a/src/main/java/org/example/scoreboard/reference/reference/Team.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.example.scoreboard.reference.reference; - -import org.example.scoreboard.reference.generic.AbstractTeam; - -public class Team extends AbstractTeam { - public Team(String name) { - super(name); - } -} diff --git a/src/test/java/org/example/scoreboard/reference/TestScoreboard.java b/src/test/java/org/example/scoreboard/reference/TestScoreboard.java index 9949326..7c7c1b7 100644 --- a/src/test/java/org/example/scoreboard/reference/TestScoreboard.java +++ b/src/test/java/org/example/scoreboard/reference/TestScoreboard.java @@ -1,11 +1,7 @@ package org.example.scoreboard.reference; -import org.example.scoreboard.reference.api.IMatch; -import org.example.scoreboard.reference.api.IScore; -import org.example.scoreboard.reference.reference.Match; -import org.example.scoreboard.reference.reference.Score; -import org.example.scoreboard.reference.reference.Scoreboard; -import org.example.scoreboard.reference.reference.Team; +import org.example.scoreboard.api.IMatch; +import org.example.scoreboard.api.IScore; import org.junit.After; import org.junit.Before; import org.junit.Test; -- 2.24.1