Url (@NotNull String name) { StringBuilder result = new StringBuilder(); String parameters = this.parameters; if (parameters == null) return this; if (parameters.startsWith("?")) { parameters = StringUtil.trimStart(parameters, "?"); result.append("?"); } boolean added = false; for (String s : parameters.split("&")) { String currentName = ContainerUtil.getFirstItem(StringUtil.split(s, "=")); if (!StringUtil.equals(currentName, name)) { if (added) result.append("&"); result.append(s); added = true; } } return new UrlImpl(scheme, authority, path, result.toString()); }