SearchSuggestionResult.Builder


public static final class SearchSuggestionResult.Builder
extends Object

java.lang.Object
   ↳ android.app.appsearch.SearchSuggestionResult.Builder


The Builder class of SearchSuggestionResult.

Summary

Public constructors

Builder()

Public methods

SearchSuggestionResult build()

Build a SearchSuggestionResult object

SearchSuggestionResult.Builder setSuggestedResult(String suggestedResult)

Sets the suggested result that could be used as query expression in the AppSearchSession.search(String, SearchSpec).

Inherited methods

Public constructors

Builder

Added in API level 34
public Builder ()

Public methods

build

Added in API level 34
public SearchSuggestionResult build ()

Build a SearchSuggestionResult object

Returns
SearchSuggestionResult This value cannot be null.

setSuggestedResult

Added in API level 34
public SearchSuggestionResult.Builder setSuggestedResult (String suggestedResult)

Sets the suggested result that could be used as query expression in the AppSearchSession.search(String, SearchSpec).

The suggested result should only contain lowercase or special characters.

Parameters
suggestedResult String: This value cannot be null.

Returns
SearchSuggestionResult.Builder This value cannot be null.