private static <T> void merge(Object2IntMap<? super T> to, Object2IntMap<T> from) {
    for (Object2IntMap.Entry<T> entry : from.object2IntEntrySet()) {
      T key = entry.getKey();
      to.put(key, to.containsKey(key) ? Math.max(to.getInt(key), entry.getIntValue()) : entry.getIntValue());
    }
  }
private static <T> void merge(Object2IntMap<? super T> to, Object2IntMap<T> from)