(qs, WIP) Tidy it up a bit

This commit is contained in:
Viktor Lofgren 2024-03-28 13:54:30 +01:00
parent fe62593286
commit 15391c7a88

View File

@ -10,11 +10,11 @@ class QWordPathsRenderer {
private final Set<QWordPath> paths; private final Set<QWordPath> paths;
private QWordPathsRenderer(Collection<QWordPath> paths) { private QWordPathsRenderer(Collection<QWordPath> paths) {
this.paths = Collections.unmodifiableSet(new HashSet<>(paths)); this.paths = Set.copyOf(paths);
} }
private QWordPathsRenderer(QWordGraph graph) { private QWordPathsRenderer(QWordGraph graph) {
this.paths = Collections.unmodifiableSet(QWordGraphPathLister.listPaths(graph)); this.paths = Set.copyOf(QWordGraphPathLister.listPaths(graph));
} }
public static String render(QWordGraph graph) { public static String render(QWordGraph graph) {