Stay organized with collections
Save and categorize content based on your preferences.
Topic
class Topic
Represent the topic result from the getTopics API.
Summary
Public constructors |
Creates an object which represents the result from the getTopics API.
|
Public constructors
Topic
Topic(
mTaxonomyVersion: Long,
mModelVersion: Long,
mTopicId: Int)
Creates an object which represents the result from the getTopics API.
Parameters |
mTaxonomyVersion |
Long: a long representing the version of the taxonomy. |
mModelVersion |
Long: a long representing the version of the model. |
mTopicId |
Int: an integer representing the unique id of a topic. |
Public methods
equals
fun equals(other: Any?): Boolean
Parameters |
obj |
the reference object with which to compare. |
Return |
Boolean |
true if this object is the same as the obj argument; false otherwise. |
getModelVersion
fun getModelVersion(): Long
Get the ModelVersion.
getTaxonomyVersion
fun getTaxonomyVersion(): Long
Get the TaxonomyVersion.
getTopicId
fun getTopicId(): Int
Get the Topic ID.
hashCode
fun hashCode(): Int
Return |
Int |
a hash code value for this object. |
toString
fun toString(): String
Return |
String |
a string representation of the object. |
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,["# Topic\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [Ad Services Extensions 4](https://developer.android.com/sdkExtensions)\n\nTopic\n=====\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/adservices/topics/Topic \"View this page in Java\") \n\n```\nclass Topic\n```\n\n|---|--------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.adservices.topics.Topic](#) |\n\nRepresent the topic result from the getTopics API.\n\nSummary\n-------\n\n| Public constructors ||\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [Topic](#Topic(kotlin.Long,%20kotlin.Long,%20kotlin.Int))`(`mTaxonomyVersion:` `[Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`, `mModelVersion:` `[Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`, `mTopicId:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Creates an object which represents the result from the getTopics API. |\n\n| Public methods ||\n|------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [equals](#equals(kotlin.Any))`(`other:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)?`)` \u003cbr /\u003e |\n| [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html) | [getModelVersion](#getModelVersion())`()` Get the ModelVersion. |\n| [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html) | [getTaxonomyVersion](#getTaxonomyVersion())`()` Get the TaxonomyVersion. |\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getTopicId](#getTopicId())`()` Get the Topic ID. |\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [hashCode](#hashCode())`()` \u003cbr /\u003e |\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [toString](#toString())`()` \u003cbr /\u003e |\n\nPublic constructors\n-------------------\n\n### Topic\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [Ad Services Extensions 4](https://developer.android.com/sdkExtensions) \n\n```\nTopic(\n mTaxonomyVersion: Long, \n mModelVersion: Long, \n mTopicId: Int)\n```\n\nCreates an object which represents the result from the getTopics API.\n\n| Parameters ||\n|--------------------|--------------------------------------------------------------------------------------------------------------------------------|\n| `mTaxonomyVersion` | [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html): a long representing the version of the taxonomy. |\n| `mModelVersion` | [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html): a long representing the version of the model. |\n| `mTopicId` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): an integer representing the unique id of a topic. |\n\nPublic methods\n--------------\n\n### equals\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun equals(other: Any?): Boolean\n```\n\n| Parameters ||\n|-------|---------------------------------------------|\n| `obj` | the reference object with which to compare. |\n\n| Return ||\n|------------------------------------------------------------------------------------|---------------------------------------------------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | `true` if this object is the same as the obj argument; `false` otherwise. |\n\n### getModelVersion\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [Ad Services Extensions 4](https://developer.android.com/sdkExtensions) \n\n```\nfun getModelVersion(): Long\n```\n\nGet the ModelVersion. \n\n### getTaxonomyVersion\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [Ad Services Extensions 4](https://developer.android.com/sdkExtensions) \n\n```\nfun getTaxonomyVersion(): Long\n```\n\nGet the TaxonomyVersion. \n\n### getTopicId\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [Ad Services Extensions 4](https://developer.android.com/sdkExtensions) \n\n```\nfun getTopicId(): Int\n```\n\nGet the Topic ID. \n\n### hashCode\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun hashCode(): Int\n```\n\n| Return ||\n|----------------------------------------------------------------------------|------------------------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | a hash code value for this object. |\n\n### toString\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun toString(): String\n```\n\n| Return ||\n|----------------------------------------------------------------------------------|----------------------------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | a string representation of the object. |"]]