public final class

TextClassificationContext.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.textclassifier.TextClassificationContext.Builder

Overview

A builder for building a TextClassification context.

Summary

Constructors
publicBuilder(java.lang.String packageName, java.lang.String widgetType)

Initializes a new builder for text classification context objects.

Methods
public TextClassificationContextbuild()

Builds the text classification context object.

public TextClassificationContext.BuildersetWidgetVersion(java.lang.String widgetVersion)

Sets an optional custom version string for the widget type.

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

Constructors

public Builder(java.lang.String packageName, java.lang.String widgetType)

Initializes a new builder for text classification context objects.

Parameters:

packageName: the name of the calling package
widgetType: the type of widget e.g. TextClassifier.WIDGET_TYPE_TEXTVIEW

Methods

public TextClassificationContext.Builder setWidgetVersion(java.lang.String widgetVersion)

Sets an optional custom version string for the widget type.

Returns:

this builder

Builds the text classification context object.

Returns:

the built TextClassificationContext object