public final class

TextClassifier.EntityConfig.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.textclassifier.TextClassifier.EntityConfig.Builder

Overview

Builder class to construct the TextClassifier.EntityConfig object.

Summary

Constructors
publicBuilder()

Methods
public TextClassifier.EntityConfigbuild()

Combines all of the options that have been set and returns a new TextClassifier.EntityConfig object.

public TextClassifier.EntityConfig.BuilderincludeTypesFromTextClassifier(boolean includeTypesFromTextClassifier)

Specifies to include the default entity types suggested by the text classifier.

public TextClassifier.EntityConfig.BuildersetExcludedTypes(java.util.Collection<java.lang.String> excludedTypes)

Sets a collection of entity types that are explicitly excluded.

public TextClassifier.EntityConfig.BuildersetHints(java.util.Collection<java.lang.String> hints)

Sets a collection of hints for the text classifier to determine what types of entities to find.

public TextClassifier.EntityConfig.BuildersetIncludedTypes(java.util.Collection<java.lang.String> includedTypes)

Sets a collection of entity types that are explicitly included.

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

Constructors

public Builder()

Methods

public TextClassifier.EntityConfig.Builder setIncludedTypes(java.util.Collection<java.lang.String> includedTypes)

Sets a collection of entity types that are explicitly included.

public TextClassifier.EntityConfig.Builder setExcludedTypes(java.util.Collection<java.lang.String> excludedTypes)

Sets a collection of entity types that are explicitly excluded.

public TextClassifier.EntityConfig.Builder setHints(java.util.Collection<java.lang.String> hints)

Sets a collection of hints for the text classifier to determine what types of entities to find.

See also: TextClassifier.HINT_TEXT_IS_EDITABLE, TextClassifier.HINT_TEXT_IS_NOT_EDITABLE

public TextClassifier.EntityConfig.Builder includeTypesFromTextClassifier(boolean includeTypesFromTextClassifier)

Specifies to include the default entity types suggested by the text classifier. By default, it is included.

Combines all of the options that have been set and returns a new TextClassifier.EntityConfig object.