class ControllerInfo {

    @Override
    public boolean equals(Object toBeCompared) {
        if (toBeCompared instanceof ControllerInfo) {
            ControllerInfo controllerInfo = (ControllerInfo) toBeCompared;
            if (controllerInfo.type().equals(this.type)
                    && controllerInfo.ip().equals(this.ip())
                    && controllerInfo.port() == this.port) {
                return true;
            }
        }
        return false;
    }

    public  ControllerInfo(IpAddress ip, int port, String type);
    public  ControllerInfo(String target);

}