public final class

SearchResult.MatchInfo.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.appsearch.app.SearchResult.MatchInfo.Builder

Overview

Builder for SearchResult.MatchInfo objects.

Summary

Constructors
publicBuilder(java.lang.String propertyPath)

Creates a new SearchResult.MatchInfo.Builder reporting a match with the given property path.

Methods
public SearchResult.MatchInfobuild()

Constructs a new SearchResult.MatchInfo.

public SearchResult.MatchInfo.BuildersetExactMatchRange(SearchResult.MatchRange matchRange)

Sets the exact SearchResult.MatchRange corresponding to the given entry.

public SearchResult.MatchInfo.BuildersetSnippetRange(SearchResult.MatchRange matchRange)

Sets the snippet SearchResult.MatchRange corresponding to the given entry.

public SearchResult.MatchInfo.BuildersetSubmatchRange(SearchResult.MatchRange matchRange)

Sets the submatch SearchResult.MatchRange corresponding to the given entry.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder(java.lang.String propertyPath)

Creates a new SearchResult.MatchInfo.Builder reporting a match with the given property path.

A property path is a dot-delimited sequence of property names indicating which property in the document these snippets correspond to.

Example properties: 'body', 'sender.name', 'sender.emailaddress', etc. For class example 1 this returns "subject".

Parameters:

propertyPath: A {@code dot-delimited sequence of property names indicating which property in the document these snippets correspond to.

Methods

public SearchResult.MatchInfo.Builder setExactMatchRange(SearchResult.MatchRange matchRange)

Sets the exact SearchResult.MatchRange corresponding to the given entry.

public SearchResult.MatchInfo.Builder setSubmatchRange(SearchResult.MatchRange matchRange)

Sets the submatch SearchResult.MatchRange corresponding to the given entry.

public SearchResult.MatchInfo.Builder setSnippetRange(SearchResult.MatchRange matchRange)

Sets the snippet SearchResult.MatchRange corresponding to the given entry.

public SearchResult.MatchInfo build()

Constructs a new SearchResult.MatchInfo.