Stay organized with collections
Save and categorize content based on your preferences.
Builder
class Builder
Builder for CharSequenceTransformation
objects.
Summary
Public constructors |
Creates a new builder and adds the first transformed contents of a field to the overall result of this transformation.
|
Public constructors
Builder
Builder(
id: AutofillId,
regex: Pattern,
subst: String)
Creates a new builder and adds the first transformed contents of a field to the overall result of this transformation.
Parameters |
id |
AutofillId: id of the screen field. This value cannot be null . |
regex |
Pattern: regular expression with groups (delimited by ( and ( ) that are used to substitute parts of the value. This value cannot be null . |
subst |
String: the string that substitutes the matched regex, using $ for group substitution ($1 for 1st group match, $2 for 2nd, etc). This value cannot be null . |
Public methods
addField
open fun addField(
id: AutofillId,
regex: Pattern,
subst: String
): CharSequenceTransformation.Builder!
Adds the transformed contents of a field to the overall result of this transformation.
Parameters |
id |
AutofillId: id of the screen field. This value cannot be null . |
regex |
Pattern: regular expression with groups (delimited by ( and ( ) that are used to substitute parts of the value. This value cannot be null . |
subst |
String: the string that substitutes the matched regex, using $ for group substitution ($1 for 1st group match, $2 for 2nd, etc). This value cannot be null . |
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,["# CharSequenceTransformation.Builder\n\nAdded in [API level 27](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nBuilder\n=======\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/service/autofill/CharSequenceTransformation.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.service.autofill.CharSequenceTransformation.Builder](#) |\n\nBuilder for [CharSequenceTransformation](/reference/kotlin/android/service/autofill/CharSequenceTransformation) objects.\n\nSummary\n-------\n\n| Public constructors ||\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [Builder](#Builder(android.view.autofill.AutofillId,%20java.util.regex.Pattern,%20kotlin.String))`(`id:` `[AutofillId](../../view/autofill/AutofillId.html#)`, `regex:` `[Pattern](../../../java/util/regex/Pattern.html#)`, `subst:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Creates a new builder and adds the first transformed contents of a field to the overall result of this transformation. |\n\n| Public methods ||\n|-----------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| open [CharSequenceTransformation.Builder](#)! | [addField](#addField(android.view.autofill.AutofillId,%20java.util.regex.Pattern,%20kotlin.String))`(`id:` `[AutofillId](../../view/autofill/AutofillId.html#)`, `regex:` `[Pattern](../../../java/util/regex/Pattern.html#)`, `subst:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Adds the transformed contents of a field to the overall result of this transformation. |\n| open [CharSequenceTransformation](/reference/kotlin/android/service/autofill/CharSequenceTransformation)! | [build](#build())`()` Creates a new [CharSequenceTransformation](/reference/kotlin/android/service/autofill/CharSequenceTransformation) instance. |\n\nPublic constructors\n-------------------\n\n### Builder\n\nAdded in [API level 27](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nBuilder(\n id: AutofillId, \n regex: Pattern, \n subst: String)\n```\n\nCreates a new builder and adds the first transformed contents of a field to the overall result of this transformation.\n\n| Parameters ||\n|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `id` | [AutofillId](../../view/autofill/AutofillId.html#): id of the screen field. This value cannot be `null`. |\n| `regex` | [Pattern](../../../java/util/regex/Pattern.html#): regular expression with groups (delimited by `(` and `(`) that are used to substitute parts of the value. This value cannot be `null`. |\n| `subst` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): the string that substitutes the matched regex, using `$` for group substitution (`$1` for 1st group match, `$2` for 2nd, etc). This value cannot be `null`. |\n\nPublic methods\n--------------\n\n### addField\n\nAdded in [API level 27](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun addField(\n id: AutofillId, \n regex: Pattern, \n subst: String\n): CharSequenceTransformation.Builder!\n```\n\nAdds the transformed contents of a field to the overall result of this transformation.\n\n| Parameters ||\n|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `id` | [AutofillId](../../view/autofill/AutofillId.html#): id of the screen field. This value cannot be `null`. |\n| `regex` | [Pattern](../../../java/util/regex/Pattern.html#): regular expression with groups (delimited by `(` and `(`) that are used to substitute parts of the value. This value cannot be `null`. |\n| `subst` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): the string that substitutes the matched regex, using `$` for group substitution (`$1` for 1st group match, `$2` for 2nd, etc). This value cannot be `null`. |\n\n| Return ||\n|------------------------------------------|---------------|\n| [CharSequenceTransformation.Builder](#)! | this builder. |\n\n### build\n\nAdded in [API level 27](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun build(): CharSequenceTransformation!\n```\n\nCreates a new [CharSequenceTransformation](/reference/kotlin/android/service/autofill/CharSequenceTransformation) instance."]]