Stay organized with collections
Save and categorize content based on your preferences.
Builder
class Builder
A builder for TrainingExamplesOutput
Summary
Public constructors
Public methods
build
fun build(): TrainingExamplesOutput
Builds the instance. This builder should not be touched after calling this!
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.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# TrainingExamplesOutput.Builder\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nBuilder\n=======\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/adservices/ondevicepersonalization/TrainingExamplesOutput.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.adservices.ondevicepersonalization.TrainingExamplesOutput.Builder](#) |\n\nA builder for [TrainingExamplesOutput](/reference/kotlin/android/adservices/ondevicepersonalization/TrainingExamplesOutput)\n\nSummary\n-------\n\n| Public constructors ||\n|----------------------------------|---|\n| [Builder](#Builder())`()` \u003cbr /\u003e |\n\n| Public methods ||\n|---------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [TrainingExamplesOutput.Builder](#) | [addTrainingExampleRecord](#addTrainingExampleRecord(android.adservices.ondevicepersonalization.TrainingExampleRecord))`(`value:` `[TrainingExampleRecord](/reference/kotlin/android/adservices/ondevicepersonalization/TrainingExampleRecord)`)` \u003cbr /\u003e |\n| [TrainingExamplesOutput](/reference/kotlin/android/adservices/ondevicepersonalization/TrainingExamplesOutput) | [build](#build())`()` Builds the instance. |\n| [TrainingExamplesOutput.Builder](#) | [setTrainingExampleRecords](#setTrainingExampleRecords(kotlin.collections.MutableList))`(`value:` `[MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)\u003c[TrainingExampleRecord](/reference/kotlin/android/adservices/ondevicepersonalization/TrainingExampleRecord)!\u003e`)` The list of training example byte arrays. |\n\nPublic constructors\n-------------------\n\n### Builder\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nBuilder()\n```\n\nPublic methods\n--------------\n\n### addTrainingExampleRecord\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun addTrainingExampleRecord(value: TrainingExampleRecord): TrainingExamplesOutput.Builder\n```\n\n| Parameters ||\n|---------|-------------------------------------------------------------------------------------------------------------------------------------------|\n| `value` | [TrainingExampleRecord](/reference/kotlin/android/adservices/ondevicepersonalization/TrainingExampleRecord): This value cannot be `null`. |\n\n| Return ||\n|-------------------------------------|------------------------------|\n| [TrainingExamplesOutput.Builder](#) | This value cannot be `null`. |\n\n**See Also**\n\n- [#setTrainingExampleRecords](#setTrainingExampleRecords(kotlin.collections.MutableList)) \n\n### build\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun build(): TrainingExamplesOutput\n```\n\nBuilds the instance. This builder should not be touched after calling this!\n\n| Return ||\n|---------------------------------------------------------------------------------------------------------------|------------------------------|\n| [TrainingExamplesOutput](/reference/kotlin/android/adservices/ondevicepersonalization/TrainingExamplesOutput) | This value cannot be `null`. |\n\n### setTrainingExampleRecords\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun setTrainingExampleRecords(value: MutableList\u003cTrainingExampleRecord!\u003e): TrainingExamplesOutput.Builder\n```\n\nThe list of training example byte arrays. The format is a binary serialized [tensorflow.Example](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/example/example.proto) proto. The maximum allowed example size is 50KB.\n\n| Parameters ||\n|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `value` | [MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)\\\u003c[TrainingExampleRecord](/reference/kotlin/android/adservices/ondevicepersonalization/TrainingExampleRecord)!\\\u003e: This value cannot be `null`. |\n\n| Return ||\n|-------------------------------------|------------------------------|\n| [TrainingExamplesOutput.Builder](#) | This value cannot be `null`. |"]]