resolved workspace adjustments for topological order
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user