Url (@NotNull Map<String, String> parameters) { if (parameters.isEmpty()) { return this; } StringBuilder builder = new StringBuilder(); if (this.parameters == null) { builder.append('?'); } else { builder.append(this.parameters); builder.append('&'); } Urls.encodeParameters(parameters, builder); return new UrlImpl(scheme, authority, path, builder.toString()); }