package org.hedgecode.snooker.json;
+import java.io.Serializable;
import java.util.Collections;
import java.util.Comparator;
import java.util.Iterator;
* @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
+ );
}
}