Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Ctors](https://developer.android.com/reference/android/view/textclassifier/TextLinks.Request.Builder#pubctors) \| [Methods](https://developer.android.com/reference/android/view/textclassifier/TextLinks.Request.Builder#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/view/textclassifier/TextLinks.Request.Builder#inhmethods)

# TextLinks.Request.Builder

*** ** * ** ***

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

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.view.textclassifier.TextLinks.Request.Builder |

<br />

*** ** * ** ***

A builder for building TextLinks requests.

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/view/textclassifier/TextLinks.Request.Builder#Builder(java.lang.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence text) ` |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/android/view/textclassifier/TextLinks.Request` | ` https://developer.android.com/reference/android/view/textclassifier/TextLinks.Request.Builder#build()() ` Builds and returns the request object. |
| ` https://developer.android.com/reference/android/view/textclassifier/TextLinks.Request.Builder` | ` https://developer.android.com/reference/android/view/textclassifier/TextLinks.Request.Builder#setDefaultLocales(android.os.LocaleList)(https://developer.android.com/reference/android/os/LocaleList defaultLocales) ` Sets ordered list of locale preferences that may be used to disambiguate the provided text. |
| ` https://developer.android.com/reference/android/view/textclassifier/TextLinks.Request.Builder` | ` https://developer.android.com/reference/android/view/textclassifier/TextLinks.Request.Builder#setEntityConfig(android.view.textclassifier.TextClassifier.EntityConfig)(https://developer.android.com/reference/android/view/textclassifier/TextClassifier.EntityConfig entityConfig) ` Sets the entity configuration to use. |
| ` https://developer.android.com/reference/android/view/textclassifier/TextLinks.Request.Builder` | ` https://developer.android.com/reference/android/view/textclassifier/TextLinks.Request.Builder#setExtras(android.os.Bundle)(https://developer.android.com/reference/android/os/Bundle extras) ` Sets the extended data. |
| ` https://developer.android.com/reference/android/view/textclassifier/TextLinks.Request.Builder` | ` https://developer.android.com/reference/android/view/textclassifier/TextLinks.Request.Builder#setReferenceTime(java.time.ZonedDateTime)(https://developer.android.com/reference/java/time/ZonedDateTime referenceTime) ` Sets the reference time based on which relative dates (e.g. |

### 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 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Builder (CharSequence text)
```

<br />

<br />

| Parameters ||
|---|---|
| `text` | `CharSequence`: This value cannot be `null`. <br /> |

## Public methods

### build

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

```
public TextLinks.Request build ()
```

Builds and returns the request object.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/textclassifier/TextLinks.Request` | This value cannot be `null`. <br /> |

### setDefaultLocales

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

```
public TextLinks.Request.Builder setDefaultLocales (LocaleList defaultLocales)
```

Sets ordered list of locale preferences that may be used to disambiguate the provided text.

<br />

| Parameters ||
|---|---|
| `defaultLocales` | `LocaleList`: ordered list of locale preferences that may be used to disambiguate the provided text. If no locale preferences exist, set this to null or an empty locale list. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/textclassifier/TextLinks.Request.Builder` | this builder. This value cannot be `null`. <br /> |

### setEntityConfig

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

```
public TextLinks.Request.Builder setEntityConfig (TextClassifier.EntityConfig entityConfig)
```

Sets the entity configuration to use. This determines what types of entities the TextClassifier will look for. Set to `null` for the default entity config and the TextClassifier will automatically determine what links to generate.

<br />

| Parameters ||
|---|---|
| `entityConfig` | `TextClassifier.EntityConfig`: This value may be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/textclassifier/TextLinks.Request.Builder` | this builder <br /> |

### setExtras

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

```
public TextLinks.Request.Builder setExtras (Bundle extras)
```

Sets the extended data.

<br />

| Parameters ||
|---|---|
| `extras` | `Bundle`: This value may be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/textclassifier/TextLinks.Request.Builder` | this builder <br /> |

### setReferenceTime

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

```
public TextLinks.Request.Builder setReferenceTime (ZonedDateTime referenceTime)
```

Sets the reference time based on which relative dates (e.g. "tomorrow") should be interpreted.

<br />

| Parameters ||
|---|---|
| `referenceTime` | `ZonedDateTime`: reference time based on which relative dates. This should usually be the time when the text was originally composed. This value may be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/textclassifier/TextLinks.Request.Builder` | this builder. This value cannot be `null`. <br /> |