String (Object @NotNull ... parts) { StringBuilder builder = new StringBuilder(getUrl()); builder.append(getRestApiPathPrefix()); if (!builder.isEmpty() && builder.charAt(builder.length() - 1) == '/') { builder.deleteCharAt(builder.length() - 1); } for (Object part : parts) { if (part == null || part.equals("")) { continue; } builder.append('/').append(TaskUtil.encodeUrl(String.valueOf(part))); } return builder.toString(); }