[LIB-5] Collection empty objects,reporting and serializable
[snooker-score-api.git] / src / main / java / org / hedgecode / snooker / json / JsonCollectionEntity.java
index 3223323..ef67ff6 100644 (file)
@@ -16,6 +16,7 @@
 
 package org.hedgecode.snooker.json;
 
+import java.io.Serializable;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.Iterator;
@@ -33,20 +34,24 @@ import org.hedgecode.snooker.api.IdEntity;
  * @author Dmitry Samoshin aka gotty
  */
 public abstract class JsonCollectionEntity<E extends IdEntity>
-        implements CollectionEntity<E>, JsonSerializable
+        implements CollectionEntity<E>, Serializable
 {
     private final Map<Integer, E> entities = new LinkedHashMap<>();
 
     protected JsonCollectionEntity(E[] entities) {
         for (E entity : entities) {
             if (entity != null)
-                this.entities.put(entity.getId(), entity);
+                this.entities.put(
+                        entity.getId(), entity
+                );
         }
     }
 
     protected JsonCollectionEntity(List<E> entities) {
         for (E entity : entities) {
-            this.entities.put(entity.getId(), entity);
+            this.entities.put(
+                    entity.getId(), entity
+            );
         }
     }