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 |
Inherited constants | |
---|---|
Public methods | |
---|---|
static TextClassifier.EntityConfig! |
create(hints: MutableCollection<String!>?, includedEntityTypes: MutableCollection<String!>?, excludedEntityTypes: MutableCollection<String!>?) Creates an EntityConfig. |
static TextClassifier.EntityConfig! |
createWithExplicitEntityList(entityTypes: MutableCollection<String!>?) Creates an EntityConfig with an explicit entity list. |
static TextClassifier.EntityConfig! |
createWithHints(hints: MutableCollection<String!>?) Creates an EntityConfig. |
Int | |
MutableCollection<String!>! |
getHints() Retrieves the list of hints. |
MutableCollection<String!>! |
resolveEntityListModifications(entityTypes: 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
static funcreate(
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
static funcreateWithExplicitEntityList(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
static funcreateWithHints(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
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
fun getHints(): MutableCollection<String!>!
Retrieves the list of hints.
Return | |
---|---|
MutableCollection<String!>! |
An unmodifiable collection of the hints. |
resolveEntityListModifications
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
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
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 |