diff --git a/src/main/java/me/alexpresso/zuninja/classes/projection/action/ActionElementList.java b/src/main/java/me/alexpresso/zuninja/classes/projection/action/ActionElementList.java index b610d52..a23aa67 100644 --- a/src/main/java/me/alexpresso/zuninja/classes/projection/action/ActionElementList.java +++ b/src/main/java/me/alexpresso/zuninja/classes/projection/action/ActionElementList.java @@ -14,7 +14,10 @@ public void add(final ActionElement element, final int count) { @Override public String getIdentifier() { return this.stream() - .map(ActionElement::getIdentifier) + .collect(Collectors.groupingBy(ActionElement::getIdentifier, Collectors.counting())) + .entrySet() + .stream() + .map(e -> e.getValue() == 1 ? e.getKey() : String.format("%s*%s", e.getKey(), e.getValue())) .collect(Collectors.joining(" + ")); } }