Added in API level 28

EntityConfig

class EntityConfig : Parcelable
kotlin.Any
   ↳ android.view.textclassifier.TextClassifier.EntityConfig

Configuration object for specifying what entity types to identify. Configs are initially based on a predefined preset, and can be modified from there.

Summary

Nested classes

Builder class to construct the EntityConfig object.

Inherited constants
Public methods
static TextClassifier.EntityConfig!
create(hints: MutableCollection<String!>?, includedEntityTypes: MutableCollection<String!>?, excludedEntityTypes: MutableCollection<String!>?)

Creates an EntityConfig.

static TextClassifier.EntityConfig!

Creates an EntityConfig with an explicit entity list.

static TextClassifier.EntityConfig!

Creates an EntityConfig.

Int

MutableCollection<String!>!

Retrieves the list of hints.

MutableCollection<String!>!

Returns a final list of entity types to find.

Boolean

Return whether the client allows the text classifier to include its own list of default types.

Unit
writeToParcel(parcel: Parcel, flags: Int)

Properties
static Parcelable.Creator<TextClassifier.EntityConfig!>

Public methods

create

Added in API level 28
Deprecated in API level 29
static fun create(
    hints: MutableCollection<String!>?,
    includedEntityTypes: MutableCollection<String!>?,
    excludedEntityTypes: MutableCollection<String!>?
): TextClassifier.EntityConfig!

Deprecated: Use Builder instead.

Creates an EntityConfig.

Parameters
hints MutableCollection<String!>?: Hints for the TextClassifier to determine what types of entities to find This value may be null.
includedEntityTypes MutableCollection<String!>?: Entity types, e.g. TYPE_EMAIL, to explicitly include This value may be null.
excludedEntityTypes MutableCollection<String!>?: Entity types, e.g. TYPE_PHONE, to explicitly exclude Note that if an entity has been excluded, the exclusion will take precedence. This value may be null.

createWithExplicitEntityList

Added in API level 28
Deprecated in API level 29
static fun createWithExplicitEntityList(entityTypes: MutableCollection<String!>?): TextClassifier.EntityConfig!

Deprecated: Use Builder instead.

Creates an EntityConfig with an explicit entity list.

Parameters
entityTypes MutableCollection<String!>?: Complete set of entities, e.g. TYPE_URL to find. This value may be null.

createWithHints

Added in API level 28
Deprecated in API level 29
static fun createWithHints(hints: MutableCollection<String!>?): TextClassifier.EntityConfig!

Deprecated: Use Builder instead.

Creates an EntityConfig.

Parameters
hints MutableCollection<String!>?: Hints for the TextClassifier to determine what types of entities to find. This value may be null.

describeContents

Added in API level 28
fun describeContents(): Int
Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

getHints

Added in API level 28
fun getHints(): MutableCollection<String!>!

Retrieves the list of hints.

Return
MutableCollection<String!>! An unmodifiable collection of the hints.

resolveEntityListModifications

Added in API level 28
fun resolveEntityListModifications(entityTypes: MutableCollection<String!>): MutableCollection<String!>!

Returns a final list of entity types to find.

Parameters
entityTypes MutableCollection<String!>: Entity types we think should be found before factoring in includes/excludes This method is intended for use by TextClassifier implementations. This value cannot be null.

shouldIncludeTypesFromTextClassifier

Added in API level 29
fun shouldIncludeTypesFromTextClassifier(): Boolean

Return whether the client allows the text classifier to include its own list of default types. If this function returns true, a default list of types suggested from a text classifier will be taking into account.

NOTE: This method is intended for use by a text classifier.

writeToParcel

Added in API level 28
fun writeToParcel(
    parcel: Parcel,
    flags: Int
): Unit
Parameters
dest The Parcel in which the object should be written. This value cannot be null.
flags Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Properties

CREATOR

Added in API level 28
static val CREATOR: Parcelable.Creator<TextClassifier.EntityConfig!>