resolved workspace adjustments for topological order

This commit is contained in:
2026-03-24 13:42:14 +00:00
parent c74bbf03b4
commit efa8063b57
9 changed files with 42 additions and 19 deletions
@@ -1,5 +1,7 @@
package p.studio.utilities.structures;
import org.apache.commons.collections4.ListUtils;
import java.util.*;
import java.util.stream.Stream;
@@ -83,4 +85,10 @@ public class ReadOnlyList<T> extends ReadOnlyCollection<T> {
}
return ReadOnlyList.wrap(s.toList());
}
public ReadOnlyList<T> invert() {
final var inverted = new ArrayList<>(collection);
java.util.Collections.reverse(inverted);
return ReadOnlyList.wrap(inverted);
}
}