diff --git a/AlgebraicDataflowArchitectureModel/src/models/dataConstraintModel/DataConstraintModel.java b/AlgebraicDataflowArchitectureModel/src/models/dataConstraintModel/DataConstraintModel.java index 2f99781..397a87b 100644 --- a/AlgebraicDataflowArchitectureModel/src/models/dataConstraintModel/DataConstraintModel.java +++ b/AlgebraicDataflowArchitectureModel/src/models/dataConstraintModel/DataConstraintModel.java @@ -42,7 +42,7 @@ return children[0]+".stream().filter(item -> item.getValue()==false).collect(Collectors.toList())"; } }); - public static final Symbol sortCard = new Symbol("sortCard", 1, Symbol.Type.PREFIX, new Symbol.IImplGenerator() { + public static final Symbol sortByKey = new Symbol("sortByKey", 1, Symbol.Type.PREFIX, new Symbol.IImplGenerator() { @Override public String generate(Type type, String[] children, String[] childrenSideEffects, String[] sideEffect) { String compType = ""; @@ -58,6 +58,9 @@ } } + for (String s: childrenSideEffects) { + sideEffect[0] += s; + } temp_sort=children[0]+".sort(Comparator.comparing("+compType+"::getKey));\n"; return temp_sort; } @@ -235,7 +238,7 @@ addSymbol(tail); addSymbol(extractFaceDown); addSymbol(length); - addSymbol(sortCard); + addSymbol(sortByKey); addSymbol(contains); addSymbol(get); addSymbol(set);