[LIB-5] Collection empty objects,reporting and serializable
[snooker-score-api.git] / src / main / java / org / hedgecode / snooker / api / Season.java
index 73ee53a..f4b1cf5 100644 (file)
@@ -16,6 +16,7 @@
 
 package org.hedgecode.snooker.api;
 
+import java.io.Serializable;
 import java.util.Calendar;
 import java.util.LinkedHashMap;
 import java.util.Map;
@@ -25,7 +26,7 @@ import java.util.Map;
  *
  * @author Dmitry Samoshin aka gotty
  */
-public class Season {
+public class Season implements Serializable {
 
     private static final Calendar CURRENT_CALENDAR = Calendar.getInstance();
 
@@ -35,12 +36,12 @@ public class Season {
                     ? CURRENT_CALENDAR.get(Calendar.YEAR)
                     : CURRENT_CALENDAR.get(Calendar.YEAR) - 1;
 
-    private static final int ALL_SEASONS = -1;
+    public static final int ALL_SEASONS = -1;
 
     public static final Season ALL = new Season(ALL_SEASONS);
     public static final Season CURRENT_SEASON = new Season(CURRENT_YEAR);
 
-    public static Map<Integer, Season> SEASONS = new LinkedHashMap<>();
+    private static final Map<Integer, Season> SEASONS = new LinkedHashMap<>();
 
     static {
         for (int year = BEGIN_YEAR; year < CURRENT_YEAR; ++year) {