// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.util.indexing.impl;

import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;

/**
 * Represents remapping of inputIds from {@link ValueContainerImpl} to a file ids.
 *
 * <p>Usually it is just an identity mapping and inputId == fileId. But sometimes it can be hashIs -> many fileIds.
 */
@ApiStatus.Internal
@FunctionalInterface
public interface ValueContainerInputRemapping {
  ValueContainerInputRemapping IDENTITY = inputId -> new int[]{inputId};

  @NotNull
  int[] remap(int inputId);
}

@@ -298,21 +298,35 @@
  of 
-inputIds from
+%7B@code inputId%7D-s stored in
  %7B@l
@@ -356,16 +356,13 @@
  to 
-a 
 file
- i
+I
 ds.%0A
@@ -413,16 +413,23 @@
 ing and 
+%7B@code 
 inputId 
@@ -437,17 +437,21 @@
 = fileId
-.
+%7D.%0A *
  But som
@@ -471,14 +471,21 @@
  be 
+%7B@code 
 hashI
-s
+d
  -%3E 
@@ -491,25 +491,78 @@
  many fileId
-s
+-s%7D,%0A * when multiple files have the same content hash
 .%0A */%0A@ApiSt
@@ -724,16 +724,20 @@
 %0A%0A  
+int 
 @NotNull
 %0A  i
@@ -732,22 +732,16 @@
 @NotNull
-%0A  int
 %5B%5D remap

update @NotNull and javadoc.