public final class

TextLinks.Request

extends java.lang.Object

 java.lang.Object

↳androidx.textclassifier.TextLinks.Request

Overview

A request object for generating TextLinks.

Summary

Methods
public static TextLinks.RequestcreateFromBundle(Bundle bundle)

Extracts a Request from a bundle that was added using TextLinks.Request.toBundle().

public LocaleListCompatgetDefaultLocales()

public TextClassifier.EntityConfiggetEntityConfig()

public BundlegetExtras()

Returns the extended, vendor specific data.

public java.lang.LonggetReferenceTime()

public java.lang.CharSequencegetText()

Returns the text to generate links for.

public BundletoBundle()

Adds this Request to a Bundle that can be read back with the same parameters to TextLinks.Request.createFromBundle(Bundle).

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

Methods

public java.lang.CharSequence getText()

Returns the text to generate links for.

public LocaleListCompat getDefaultLocales()

Returns:

ordered list of locale preferences that can be used to disambiguate the provided text

public TextClassifier.EntityConfig getEntityConfig()

Returns:

The config representing the set of entities to look for

See also: TextLinks.Request.Builder

public java.lang.Long getReferenceTime()

Returns:

reference time based on which relative dates (e.g. "tomorrow") should be interpreted. This should be milliseconds from the epoch of 1970-01-01T00:00:00Z(UTC timezone).

public Bundle getExtras()

Returns the extended, vendor specific data.

NOTE: Each call to this method returns a new bundle copy so clients should prefer to hold a reference to the returned bundle rather than frequently calling this method. Avoid updating the content of this bundle. On pre-O devices, the values in the Bundle are not deep copied.

public Bundle toBundle()

Adds this Request to a Bundle that can be read back with the same parameters to TextLinks.Request.createFromBundle(Bundle).

public static TextLinks.Request createFromBundle(Bundle bundle)

Extracts a Request from a bundle that was added using TextLinks.Request.toBundle().