package io.playpen.core.coordinator.network;

import io.playpen.core.p3.P3Package;
import lombok.Data;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

@Data
public class Server {
    private P3Package p3;

    private String uuid;

    private String name;

    private Map<String, String> properties = new ConcurrentHashMap<>();

    private boolean active = false;

    private LocalCoordinator coordinator = null;

    public String getName() {
        if(name == null) {
            return uuid;
        }

        return name;
    }
}

@@ -119,16 +119,42 @@
 il.Map;%0A
+import java.util.Objects;%0A
 import j
@@ -579,11 +579,146 @@
 e;%0A    %7D
+%0A%0A    @Override%0A    public int hashCode() %7B%0A        return Objects.hash(uuid, coordinator == null ? %220%22 : coordinator.getUuid());%0A    %7D
 %0A%7D%0A

fix cyclic dependency in Server#hashCode() (fixes #14)