@Override
    public void replaceValues(long key, LongArrayList values) {
      if (values.isEmpty()) {
        return;
      }
      keyToValuesIndex.put(key, (int) this.values.size());
      this.values.appendLong(values.size());
      for (int i = 0; i < values.size(); i++) {
        this.values.appendLong(values.get(i));
      }
    }
A map from {@code long} to {@code long} where each putAll replaces previous values and results are returned in the
same order they were inserted.
planetiler-core/src/main/java/com/onthegomap/planetiler/collection/LongLongMultimap.java