Keep asMap(), used by code in internal repo
package com.yahoo.searchdefinition;
import com.yahoo.config.application.api.FileRegistry;
-
import java.util.Collection;
+import java.util.Collections;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors;
@@ -42,4 +42,10 @@ public class LargeRankExpressions {
return expressions.values().stream().sorted().collect(Collectors.toUnmodifiableList());
}
+ // Note: Use by integration tests in internal repo
+ /** Returns a read-only map of the ranking constants in this indexed by name */
+ public Map<String, RankExpressionBody> asMap() {
+ return Collections.unmodifiableMap(expressions);
+ }
+
}
