@Override
    public LongArrayList get(long key) {
      int index = keyToValuesIndex.getOrDefault(key, -1);
      if (index >= 0) {
        LongArrayList result = new LongArrayList();
        int num = (int) values.getLong(index);
        for (int i = 0; i < num; i++) {
          result.add(values.getLong(i + index + 1L));
        }
        return result;
      } else {
        return EMPTY_LIST;
      }
    }
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