String (Map<String, Boolean> profiles) { StringBuilder stringBuilder = new StringBuilder(); for (Map.Entry<String, Boolean> entry : profiles.entrySet()) { if (stringBuilder.length() != 0) { stringBuilder.append(","); } if (!entry.getValue()) { stringBuilder.append("!"); } stringBuilder.append(entry.getKey()); } return stringBuilder.toString(); }