diff options
Diffstat (limited to 'subprojects/store')
-rw-r--r-- | subprojects/store/src/main/java/tools/refinery/store/util/CycleDetectingMapper.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/subprojects/store/src/main/java/tools/refinery/store/util/CycleDetectingMapper.java b/subprojects/store/src/main/java/tools/refinery/store/util/CycleDetectingMapper.java index 78ad2ad7..2e302663 100644 --- a/subprojects/store/src/main/java/tools/refinery/store/util/CycleDetectingMapper.java +++ b/subprojects/store/src/main/java/tools/refinery/store/util/CycleDetectingMapper.java | |||
@@ -20,6 +20,10 @@ public class CycleDetectingMapper<T, R> { | |||
20 | 20 | ||
21 | private final Map<T, R> results = new HashMap<>(); | 21 | private final Map<T, R> results = new HashMap<>(); |
22 | 22 | ||
23 | public CycleDetectingMapper(Function<T, R> doMap) { | ||
24 | this(Objects::toString, doMap); | ||
25 | } | ||
26 | |||
23 | public CycleDetectingMapper(Function<T, String> getName, Function<T, R> doMap) { | 27 | public CycleDetectingMapper(Function<T, String> getName, Function<T, R> doMap) { |
24 | this.getName = getName; | 28 | this.getName = getName; |
25 | this.doMap = doMap; | 29 | this.doMap = doMap; |