String (@NotNull Iterable<?> collection) { if (!collection.iterator().hasNext()) { return "<empty>"; } final StringBuilder builder = new StringBuilder(); for (final Object o : collection) { if (o instanceof Set) { builder.append(new TreeSet<>((Set<?>)o)); } else { builder.append(o); } builder.append('\n'); } return builder.toString(); }