Skip to content

Commit

Permalink
Merge pull request #206 from DecwLK/reverse_prios
Browse files Browse the repository at this point in the history
reverse priorities
  • Loading branch information
crissNb authored Mar 18, 2024
2 parents 0aa549d + 679411c commit adeaab5
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/main/java/org/gecko/io/AutomatonFileSerializer.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import java.nio.file.Files;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
Expand Down Expand Up @@ -117,7 +116,6 @@ private String serializeStateContracts(State state, Automaton automaton) {
//Building the conditions for the priorities
List<List<Edge>> groupedEdges =
new ArrayList<>(edges.stream().collect(Collectors.groupingBy(Edge::getPriority)).values());
Collections.reverse(groupedEdges); //This just makes this easier to think about
List<Condition> preConditionsByPrio = new ArrayList<>();
for (List<Edge> edgeGroup : groupedEdges) {
//OrElseThrow because validity needs to be ensured by model
Expand Down

0 comments on commit adeaab5

Please sign in to comment.