docs: public static MtasDataCollector<?, ?> getCollector(String collectorType,
        String dataType, String statsType, SortedSet<String> statsItems,
        String sortType, String sortDirection, Integer start, Integer number,
        String[] subCollectorTypes, String[] subDataTypes, String[] subStatsTypes,
        SortedSet<String>[] subStatsItems, String[] subSortTypes,
        String[] subSortDirections, Integer[] subStart, Integer[] subNumber,
        String segmentRegistration, String boundary) throws IOException {
      if (dataType != null && dataType.equals(CodecUtil.DATA_TYPE_LONG)) {
        if (statsType.equals(CodecUtil.STATS_BASIC)) {
          return new MtasDataLongBasic(collectorType, statsItems, sortType,
              sortDirection, start, number, subCollectorTypes, subDataTypes,
              subStatsTypes, subStatsItems, subSortTypes, subSortDirections,
              subStart, subNumber, segmentRegistration, boundary);
        } else if (statsType.equals(CodecUtil.STATS_ADVANCED)) {
          return new MtasDataLongAdvanced(collectorType, statsItems, sortType,
              sortDirection, start, number, subCollectorTypes, subDataTypes,
              subStatsTypes, subStatsItems, subSortTypes, subSortDirections,
              subStart, subNumber, segmentRegistration, boundary);
        } else if (statsType.equals(CodecUtil.STATS_FULL)) {
          return new MtasDataLongFull(collectorType, statsItems, sortType,
              sortDirection, start, number, subCollectorTypes, subDataTypes,
              subStatsTypes, subStatsItems, subSortTypes, subSortDirections,
              subStart, subNumber, segmentRegistration, boundary);
        } else {
          throw new IOException("unknown statsType " + statsType);
        }
      } else if (dataType != null
          && dataType.equals(CodecUtil.DATA_TYPE_DOUBLE)) {
        if (statsType.equals(CodecUtil.STATS_BASIC)) {
          return new MtasDataDoubleBasic(collectorType, statsItems, sortType,
              sortDirection, start, number, subCollectorTypes, subDataTypes,
              subStatsTypes, subStatsItems, subSortTypes, subSortDirections,
              subStart, subNumber, segmentRegistration, boundary);
        } else if (statsType.equals(CodecUtil.STATS_ADVANCED)) {
          return new MtasDataDoubleAdvanced(collectorType, statsItems, sortType,
              sortDirection, start, number, subCollectorTypes, subDataTypes,
              subStatsTypes, subStatsItems, subSortTypes, subSortDirections,
              subStart, subNumber, segmentRegistration, boundary);
        } else if (statsType.equals(CodecUtil.STATS_FULL)) {
          return new MtasDataDoubleFull(collectorType, statsItems, sortType,
              sortDirection, start, number, subCollectorTypes, subDataTypes,
              subStatsTypes, subStatsItems, subSortTypes, subSortDirections,
              subStart, subNumber, segmentRegistration, boundary);
        } else {
          throw new IOException("unknown statsType " + statsType);
        }
      } else {
        throw new IOException("unknown dataType " + dataType);
      }
    }