Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Ctors](https://developer.android.com/reference/android/app/appsearch/SearchResult.MatchInfo.Builder#pubctors) \| [Methods](https://developer.android.com/reference/android/app/appsearch/SearchResult.MatchInfo.Builder#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/app/appsearch/SearchResult.MatchInfo.Builder#inhmethods)

# SearchResult.MatchInfo.Builder

*** ** * ** ***

` public static final class SearchResult.MatchInfo.Builder `   
` extends https://developer.android.com/reference/java/lang/Object ` ` `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.app.appsearch.SearchResult.MatchInfo.Builder |

<br />

*** ** * ** ***

Builder for `https://developer.android.com/reference/android/app/appsearch/SearchResult.MatchInfo` objects.

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/app/appsearch/SearchResult.MatchInfo.Builder#Builder(java.lang.String)(https://developer.android.com/reference/java/lang/String propertyPath) ` Creates a new `https://developer.android.com/reference/android/app/appsearch/SearchResult.MatchInfo.Builder` reporting a match with the given property path. |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/android/app/appsearch/SearchResult.MatchInfo` | ` https://developer.android.com/reference/android/app/appsearch/SearchResult.MatchInfo.Builder#build()() ` Constructs a new `https://developer.android.com/reference/android/app/appsearch/SearchResult.MatchInfo`. |
| ` https://developer.android.com/reference/android/app/appsearch/SearchResult.MatchInfo.Builder` | ` https://developer.android.com/reference/android/app/appsearch/SearchResult.MatchInfo.Builder#setEmbeddingMatch(android.app.appsearch.SearchResult.EmbeddingMatchInfo)(https://developer.android.com/reference/android/app/appsearch/SearchResult.EmbeddingMatchInfo embeddingMatch) ` Sets the `https://developer.android.com/reference/android/app/appsearch/SearchResult.EmbeddingMatchInfo` corresponding to the given entry. |
| ` https://developer.android.com/reference/android/app/appsearch/SearchResult.MatchInfo.Builder` | ` https://developer.android.com/reference/android/app/appsearch/SearchResult.MatchInfo.Builder#setExactMatchRange(android.app.appsearch.SearchResult.MatchRange)(https://developer.android.com/reference/android/app/appsearch/SearchResult.MatchRange matchRange) ` Sets the exact `https://developer.android.com/reference/android/app/appsearch/SearchResult.MatchRange` corresponding to the given entry. |
| ` https://developer.android.com/reference/android/app/appsearch/SearchResult.MatchInfo.Builder` | ` https://developer.android.com/reference/android/app/appsearch/SearchResult.MatchInfo.Builder#setSnippetRange(android.app.appsearch.SearchResult.MatchRange)(https://developer.android.com/reference/android/app/appsearch/SearchResult.MatchRange matchRange) ` Sets the snippet `https://developer.android.com/reference/android/app/appsearch/SearchResult.MatchRange` corresponding to the given entry. |
| ` https://developer.android.com/reference/android/app/appsearch/SearchResult.MatchInfo.Builder` | ` https://developer.android.com/reference/android/app/appsearch/SearchResult.MatchInfo.Builder#setSubmatchRange(android.app.appsearch.SearchResult.MatchRange)(https://developer.android.com/reference/android/app/appsearch/SearchResult.MatchRange matchRange) ` Sets the submatch `https://developer.android.com/reference/android/app/appsearch/SearchResult.MatchRange` corresponding to the given entry. |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## Public constructors

### Builder

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Builder (String propertyPath)
```

Creates a new `https://developer.android.com/reference/android/app/appsearch/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".

<br />

| Parameters ||
|---|---|
| `propertyPath` | `String`: A dot-delimited sequence of property names indicating which property in the document these snippets correspond to. This value cannot be `null`. <br /> |

## Public methods

### build

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public SearchResult.MatchInfo build ()
```

Constructs a new `https://developer.android.com/reference/android/app/appsearch/SearchResult.MatchInfo`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/app/appsearch/SearchResult.MatchInfo` | This value cannot be `null`. <br /> |

### setEmbeddingMatch

Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)  
Also in [T Extensions 18](https://developer.android.com/sdkExtensions)

```
public SearchResult.MatchInfo.Builder setEmbeddingMatch (SearchResult.EmbeddingMatchInfo embeddingMatch)
```

Sets the `https://developer.android.com/reference/android/app/appsearch/SearchResult.EmbeddingMatchInfo` corresponding to the given entry.

<br />

| Parameters ||
|---|---|
| `embeddingMatch` | `SearchResult.EmbeddingMatchInfo`: This value may be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/app/appsearch/SearchResult.MatchInfo.Builder` | This value cannot be `null`. <br /> |

### setExactMatchRange

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

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

Sets the exact `https://developer.android.com/reference/android/app/appsearch/SearchResult.MatchRange` corresponding to the given entry.

<br />

| Parameters ||
|---|---|
| `matchRange` | `SearchResult.MatchRange`: This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/app/appsearch/SearchResult.MatchInfo.Builder` | This value cannot be `null`. <br /> |

### setSnippetRange

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

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

Sets the snippet `https://developer.android.com/reference/android/app/appsearch/SearchResult.MatchRange` corresponding to the given entry.

<br />

| Parameters ||
|---|---|
| `matchRange` | `SearchResult.MatchRange`: This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/app/appsearch/SearchResult.MatchInfo.Builder` | This value cannot be `null`. <br /> |

### setSubmatchRange

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [T Extensions 3](https://developer.android.com/sdkExtensions)

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

Sets the submatch `https://developer.android.com/reference/android/app/appsearch/SearchResult.MatchRange` corresponding to the given entry.

<br />

| Parameters ||
|---|---|
| `matchRange` | `SearchResult.MatchRange`: This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/app/appsearch/SearchResult.MatchInfo.Builder` | This value cannot be `null`. <br /> |