TextClassificationContext
public
final
class
TextClassificationContext
extends Object
java.lang.Object | |
↳ | androidx.textclassifier.TextClassificationContext |
A representation of the context in which text classification would be performed.
Summary
Nested classes | |
---|---|
class |
TextClassificationContext.Builder
A builder for building a TextClassification context. |
Public methods | |
---|---|
static
TextClassificationContext
|
createFromBundle(Bundle bundle)
Extracts a |
String
|
getPackageName()
Returns the package name for the calling package. |
String
|
getWidgetType()
Returns the widget type for this classification context. |
String
|
getWidgetVersion()
Returns a custom version string for the widget type. |
Bundle
|
toBundle()
Adds this classification to a Bundle that can be read back with the same parameters
to |
String
|
toString()
|
Inherited methods | |
---|---|
Public methods
createFromBundle
public static TextClassificationContext createFromBundle (Bundle bundle)
Extracts a TextClassificationContext
from a bundle that was added using
toBundle()
.
Parameters | |
---|---|
bundle |
Bundle |
Returns | |
---|---|
TextClassificationContext |
getPackageName
public String getPackageName ()
Returns the package name for the calling package.
Returns | |
---|---|
String |
getWidgetType
public String getWidgetType ()
Returns the widget type for this classification context.
Returns | |
---|---|
String |
getWidgetVersion
public String getWidgetVersion ()
Returns a custom version string for the widget type.
Returns | |
---|---|
String |
See also:
toBundle
public Bundle toBundle ()
Adds this classification to a Bundle that can be read back with the same parameters
to createFromBundle(Bundle)
.
Returns | |
---|---|
Bundle |
toString
public String toString ()
Returns | |
---|---|
String |
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.