TextClassifierEvent.LanguageDetectionEvent.Builder


public static final class TextClassifierEvent.LanguageDetectionEvent.Builder
extends Builder<TextClassifierEvent.LanguageDetectionEvent.Builder>

java.lang.Object
   ↳ android.view.textclassifier.TextClassifierEvent.Builder<android.view.textclassifier.TextClassifierEvent.LanguageDetectionEvent.Builder>
     ↳ android.view.textclassifier.TextClassifierEvent.LanguageDetectionEvent.Builder


Builder class for LanguageDetectionEvent.

Summary

Public constructors

Builder(int eventType)

Creates a builder for building TextSelectionEvents.

Inherited methods

T setActionIndices(int... actionIndices)

Sets the indices of the actions involved in this event.

T setEntityTypes(String... entityTypes)

Sets the entity types.

T setEventContext(TextClassificationContext eventContext)

Sets the event context.

T setEventIndex(int eventIndex)

Sets the index of this event in the series of events it belongs to.

T setExtras(Bundle extras)

Sets a bundle containing non-structured extra information about the event.

T setLocale(ULocale locale)

Sets the detected locale.

T setModelName(String modelVersion)

Sets the model name string.

T setResultId(String resultId)

Sets the id of the text classifier result related to this event.

T setScores(float... scores)

Sets the scores of the suggestions.

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Public constructors

Builder

Added in API level 29
public Builder (int eventType)

Creates a builder for building TextSelectionEvents.

Public methods

build

Added in API level 29
public TextClassifierEvent.LanguageDetectionEvent build ()

Builds and returns a LanguageDetectionEvent.

Returns
TextClassifierEvent.LanguageDetectionEvent This value cannot be null.