Converts a stream to a string. The elements in the collection are sorted by their string representation (in alphabet order) in the resulting string. This is particularly useful for comparing expected results with the ones given by the analysis.
(Stream<T> stream)
| 59 | * for comparing expected results with the ones given by the analysis. |
| 60 | */ |
| 61 | public static <T> String toString(Stream<T> stream) { |
| 62 | return "[" + stream.map(T::toString) |
| 63 | .sorted() |
| 64 | .collect(Collectors.joining(", ")) + "]"; |
| 65 | } |
| 66 | } |
no test coverage detected