語言

SearchResult.Builder.SetParentTypeMap 方法

定義

將從結構型別名稱映射到其父型別清單。

[Android.Runtime.Register("setParentTypeMap", "(Ljava/util/Map;)Landroid/app/appsearch/SearchResult$Builder;", "", ApiSince=36)]
public Android.App.AppSearch.SearchResult.Builder SetParentTypeMap(System.Collections.Generic.IDictionary<string,System.Collections.Generic.IList<string>> parentTypeMap);
[<Android.Runtime.Register("setParentTypeMap", "(Ljava/util/Map;)Landroid/app/appsearch/SearchResult$Builder;", "", ApiSince=36)>]
member this.SetParentTypeMap : System.Collections.Generic.IDictionary<string, System.Collections.Generic.IList<string>> -> Android.App.AppSearch.SearchResult.Builder

參數

parentTypeMap
IDictionary<String,IList<String>>

傳回

屬性

備註

將從結構型別名稱映射到其父型別清單。 映射應包含 GenericDocument 自身類型及所有巢狀文件類型的條目。 每個清單中,子類型必須先於父類型出現。 否則,GenericDocument 的 toDocumentClass 方法(僅 AndroidX 使用的 API)可能無法正確辨識最具體的類型。 這可能導致非預期的反序列化,變成更通用的類型,而非更特定的類型。 父母類型應包含傳遞父母。

Android 參考資料。android.app.appsearch.SearchResult.Builder.setParentTypeMap

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於