// Copyright 2017 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchdefinition.document; import java.util.Collections; import java.util.LinkedHashMap; import java.util.Map; /** * A set of fields that are imported from referenced document types. * * This is temporary AST structure that only refers to the imported fields by name. * * @author geirst */ public class TemporaryImportedFields { private final Map fields = new LinkedHashMap<>(); public void add(TemporaryImportedField importedField) { fields.put(importedField.fieldName(), importedField); } public Map fields() { return Collections.unmodifiableMap(fields); } }