Stay organized with collections
Save and categorize content based on your preferences.
Builder
class Builder
A builder for building TextLanguage requests.
Summary
Public constructors |
Creates a builder to build TextLanguage requests.
|
Public constructors
Builder
Builder(text: CharSequence)
Creates a builder to build TextLanguage requests.
Parameters |
text |
CharSequence: the text to process. This value cannot be null . |
Public methods
build
fun build(): TextLanguage.Request
Builds and returns a new TextLanguage request object.
If necessary, this method will verify fields, clamp them, and make them immutable.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# TextLanguage.Request.Builder\n\nAdded in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nBuilder\n=======\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/view/textclassifier/TextLanguage.Request.Builder \"View this page in Java\") \n\n```\nclass Builder\n```\n\n|---|---------------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.view.textclassifier.TextLanguage.Request.Builder](#) |\n\nA builder for building TextLanguage requests.\n\nSummary\n-------\n\n| Public constructors ||\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [Builder](#Builder(kotlin.CharSequence))`(`text:` `[CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)`)` Creates a builder to build TextLanguage requests. |\n\n| Public methods ||\n|--------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [TextLanguage.Request](/reference/kotlin/android/view/textclassifier/TextLanguage.Request) | [build](#build())`()` Builds and returns a new TextLanguage request object. |\n| [TextLanguage.Request.Builder](#) | [setExtras](#setExtras(android.os.Bundle))`(`bundle:` `[Bundle](../../os/Bundle.html#)`)` Sets a bundle containing non-structured extra information about the request. |\n\nPublic constructors\n-------------------\n\n### Builder\n\nAdded in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nBuilder(text: CharSequence)\n```\n\nCreates a builder to build TextLanguage requests.\n\n| Parameters ||\n|--------|--------------------------------------------------------------------------------------------------------------------------------------------------|\n| `text` | [CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html): the text to process. This value cannot be `null`. |\n\nPublic methods\n--------------\n\n### build\n\nAdded in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun build(): TextLanguage.Request\n```\n\nBuilds and returns a new TextLanguage request object.\n\nIf necessary, this method will verify fields, clamp them, and make them immutable.\n\n| Return ||\n|--------------------------------------------------------------------------------------------|------------------------------|\n| [TextLanguage.Request](/reference/kotlin/android/view/textclassifier/TextLanguage.Request) | This value cannot be `null`. |\n\n### setExtras\n\nAdded in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun setExtras(bundle: Bundle): TextLanguage.Request.Builder\n```\n\nSets a bundle containing non-structured extra information about the request.\n\n| Parameters ||\n|----------|---------------------------------------------------------------|\n| `bundle` | [Bundle](../../os/Bundle.html#): This value cannot be `null`. |\n\n| Return ||\n|-----------------------------------|------------------------------|\n| [TextLanguage.Request.Builder](#) | This value cannot be `null`. |"]]