docs: @Override
    public void merge(MtasDataCollector<?, ?> newDataCollector,
        Map<MtasDataCollector<?, ?>, MtasDataCollector<?, ?>> map,
        boolean increaseSourceNumber) throws IOException {
      closeNewList();
      if (!collectorType.equals(newDataCollector.getCollectorType())
          || !dataType.equals(newDataCollector.getDataType())
          || !statsType.equals(newDataCollector.getStatsType())
          || !(newDataCollector instanceof MtasDataBasic)) {
        throw new IOException("cannot merge different dataCollectors");
      } else {
        segmentRegistration = null;
        @SuppressWarnings("unchecked")
        MtasDataBasic<T1, T2> newMtasDataBasic = (MtasDataBasic<T1, T2>) newDataCollector;
        newMtasDataBasic.closeNewList();
        initNewList(newMtasDataBasic.getSize());
        if (collectorType.equals(DataCollector.COLLECTOR_TYPE_LIST)) {
          map.put(newDataCollector, this);
          for (int i = 0; i < newMtasDataBasic.getSize(); i++) {
            MtasDataCollector<?, ?>[] subCollectors = new MtasDataCollector[1];
            subCollectors[0] = add(newMtasDataBasic.keyList[i],
                increaseSourceNumber);
            setError(newCurrentPosition, newMtasDataBasic.errorNumber[i],
                newMtasDataBasic.errorList[i], newCurrentExisting);
            setValue(newCurrentPosition, newMtasDataBasic.basicValueSumList[i],
                newMtasDataBasic.basicValueNList[i], newCurrentExisting);
            if (hasSub() && newMtasDataBasic.hasSub()) {
              // single key implies exactly one subCollector if hasSub
              subCollectors[0].merge(
                  newMtasDataBasic.subCollectorListNextLevel[i], map,
                  increaseSourceNumber);
            }
          }
          closeNewList();
        } else if (collectorType.equals(DataCollector.COLLECTOR_TYPE_DATA)) {
          map.put(newDataCollector, this);
          if (newMtasDataBasic.getSize() > 0) {
            MtasDataCollector<?, ?> subCollector = add(increaseSourceNumber);
            setError(newCurrentPosition, newMtasDataBasic.errorNumber[0],
                newMtasDataBasic.errorList[0], newCurrentExisting);
            setValue(newCurrentPosition, newMtasDataBasic.basicValueSumList[0],
                newMtasDataBasic.basicValueNList[0], newCurrentExisting);
            if (hasSub() && newMtasDataBasic.hasSub()) {
              subCollector.merge(newMtasDataBasic.subCollectorNextLevel, map,
                  increaseSourceNumber);
            }
          }
          closeNewList();
        } else {
          throw new IOException("cannot merge " + collectorType);
        }
      }
    }