docs: @SuppressWarnings("unchecked")
    private T[] getDataSamples(final Class<?> clazz) {
      assert (h_ + r_) > 0;
  
      // are 2 Array.asList(data_.subList()) copies better?
      final T[] prunedList = (T[]) Array.newInstance(clazz, getNumSamples());
      int i = 0;
      for (T item : data_) {
        if (item != null) {
          prunedList[i++] = item;
        }
      }
      return prunedList;
    }