public final class

TextLinks.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.textclassifier.TextLinks.Builder

Overview

A builder to construct a TextLinks instance.

Summary

Constructors
publicBuilder(java.lang.CharSequence fullText)

Create a new TextLinks.Builder.

Methods
public TextLinks.BuilderaddLink(int start, int end, java.util.Map<java.lang.String, java.lang.Float> entityScores)

Adds a TextLink.

public TextLinksbuild()

Constructs a TextLinks instance.

public TextLinks.BuilderclearTextLinks()

Removes all TextLinks.TextLinks.

public TextLinks.BuildersetExtras(Bundle extras)

Sets the extended, vendor specific data.

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

Constructors

public Builder(java.lang.CharSequence fullText)

Create a new TextLinks.Builder.

Parameters:

fullText: The full text to annotate with links.

Methods

public TextLinks.Builder addLink(int start, int end, java.util.Map<java.lang.String, java.lang.Float> entityScores)

Adds a TextLink.

Returns:

this instance.

public TextLinks.Builder setExtras(Bundle extras)

Sets the extended, vendor specific data.

public TextLinks.Builder clearTextLinks()

Removes all TextLinks.TextLinks.

public TextLinks build()

Constructs a TextLinks instance.

Returns:

the constructed TextLinks.