TextLinks.Request
public
static
final
class
TextLinks.Request
extends Object
| java.lang.Object | |
| ↳ | androidx.textclassifier.TextLinks.Request |
A request object for generating TextLinks.
Summary
Nested classes | |
|---|---|
class |
TextLinks.Request.Builder
A builder for building TextLinks requests. |
Public methods | |
|---|---|
static
TextLinks.Request
|
createFromBundle(Bundle bundle)
Extracts a Request from a bundle that was added using |
LocaleListCompat
|
getDefaultLocales()
|
TextClassifier.EntityConfig
|
getEntityConfig()
|
Bundle
|
getExtras()
Returns the extended, vendor specific data. |
Long
|
getReferenceTime()
|
CharSequence
|
getText()
Returns the text to generate links for. |
Bundle
|
toBundle()
Adds this Request to a Bundle that can be read back with the same parameters
to |
Inherited methods | |
|---|---|
Public methods
createFromBundle
public static TextLinks.Request createFromBundle (Bundle bundle)
Extracts a Request from a bundle that was added using toBundle().
| Parameters | |
|---|---|
bundle |
Bundle |
| Returns | |
|---|---|
TextLinks.Request |
|
getDefaultLocales
public LocaleListCompat getDefaultLocales ()
| Returns | |
|---|---|
LocaleListCompat |
ordered list of locale preferences that can be used to disambiguate the provided text |
getEntityConfig
public TextClassifier.EntityConfig getEntityConfig ()
| Returns | |
|---|---|
TextClassifier.EntityConfig |
The config representing the set of entities to look for |
getExtras
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.
| Returns | |
|---|---|
Bundle |
|
getReferenceTime
public Long getReferenceTime ()
| Returns | |
|---|---|
Long |
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). |
getText
public CharSequence getText ()
Returns the text to generate links for.
| Returns | |
|---|---|
CharSequence |
|
toBundle
public Bundle toBundle ()
Adds this Request to a Bundle that can be read back with the same parameters
to createFromBundle(Bundle).
| Returns | |
|---|---|
Bundle |
|
Content and code samples on this page are subject to the licenses described in the Content License. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-09-30 UTC.