From 72698106a5adc036e9b5cf6b0b0cdaa33e81f77e Mon Sep 17 00:00:00 2001 From: Filip Izydorczyk Date: Mon, 27 Jul 2020 16:09:44 +0200 Subject: [PATCH] Main class --- .../src/main/java/com/plannaplan/App.java | 46 +++++++++++++++++++ .../java/com/plannaplan/types/AppStates.java | 5 ++ 2 files changed, 51 insertions(+) create mode 100644 buisnesslogic/src/main/java/com/plannaplan/App.java create mode 100644 buisnesslogic/src/main/java/com/plannaplan/types/AppStates.java diff --git a/buisnesslogic/src/main/java/com/plannaplan/App.java b/buisnesslogic/src/main/java/com/plannaplan/App.java new file mode 100644 index 0000000..3b32163 --- /dev/null +++ b/buisnesslogic/src/main/java/com/plannaplan/App.java @@ -0,0 +1,46 @@ +package com.plannaplan; + +import java.util.Date; + +import com.plannaplan.types.AppStates; + +public class App { + private static App instance; + private Date round1; + private Date round2; + private AppStates state; + + private App() { + } + + public AppStates getState() { + return state; + } + + public void setState(AppStates state) { + this.state = state; + } + + public Date getRound2() { + return round2; + } + + public void setRound2(Date round2) { + this.round2 = round2; + } + + public Date getRound1() { + return round1; + } + + public void setRound1(Date round1) { + this.round1 = round1; + } + + public App getInstance() { + if (this.instance == null) { + this.instance = new App(); + } + return this.instance; + } +} \ No newline at end of file diff --git a/buisnesslogic/src/main/java/com/plannaplan/types/AppStates.java b/buisnesslogic/src/main/java/com/plannaplan/types/AppStates.java new file mode 100644 index 0000000..4983619 --- /dev/null +++ b/buisnesslogic/src/main/java/com/plannaplan/types/AppStates.java @@ -0,0 +1,5 @@ +package com.plannaplan.types; + +public enum AppStates { + STOPPED, RUNNING, PAUSED +} \ No newline at end of file