public MappedOperationStatistic(Object tier, Map<D, Set<S>> translation, String statisticName, int tierHeight, String targetName, String discriminator) { this.name = statisticName; this.tags = Collections.singleton("tier"); this.properties = new HashMap<>(); this.properties.put("tierHeight", tierHeight); this.properties.put("discriminator", discriminator); Entry<D, Set<S>> first = translation.entrySet().iterator().next(); Class<S> outcomeType = first.getValue().iterator().next().getDeclaringClass(); this.outcomeType = first.getKey().getDeclaringClass(); this.mapper = new StatisticMapper<>(translation, findOperationStat(tier, outcomeType, targetName)); }