String (@NotNull Set<GraphEdge> edges) { if (edges.isEmpty()) return "none"; List<GraphEdge> sortedEdges = new ArrayList<>(edges); Collections.sort(sortedEdges, GRAPH_ELEMENT_COMPARATOR); return StringUtil.join(sortedEdges, graphEdge -> graphEdge.getUpNodeIndex() + "_" + graphEdge.getDownNodeIndex() + "_" + toChar(graphEdge.getType()), " "); }