จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
รับ TopicsResponse.Builder
public
static
final
class
GetTopicsResponse.Builder
extends Object
เครื่องมือสร้างสำหรับวัตถุ GetTopicsResponse
รายการ ควรใช้คลาสนี้ในการทดสอบ
การใช้งานตามที่คาดไว้จาก Topics API
สรุป
วิธีการที่รับมา |
จากชั้นเรียน
วันที่
java.lang.Object
Object
|
clone()
สร้างและแสดงผลสำเนาของออบเจ็กต์นี้
|
boolean
|
equals(Object obj)
ระบุว่าออบเจ็กต์อื่นบางรายการเป็น "เท่ากับ" หรือไม่ อันนี้
|
void
|
finalize()
เรียกใช้โดยผู้เก็บขยะในออบเจ็กต์เมื่อเก็บรวบรวมขยะ
ทำให้ทราบว่าไม่มีการอ้างอิงไปยังออบเจ็กต์นั้นแล้ว
|
final
Class<?>
|
getClass()
แสดงผลคลาสรันไทม์ของ Object นี้
|
int
|
hashCode()
แสดงผลค่ารหัสแฮชสำหรับออบเจ็กต์
|
final
void
|
notify()
สร้างชุดข้อความเดียวที่รออยู่ในออบเจ็กต์นี้
จอภาพ
|
final
void
|
notifyAll()
ปลุกชุดข้อความทั้งหมดที่รออยู่บนจอภาพของออบเจ็กต์นี้
|
String
|
toString()
แสดงผลตัวแทนสตริงของออบเจ็กต์
|
final
void
|
wait(long timeoutMillis, int nanos)
ทำให้เทรดปัจจุบันต้องรอจนกว่าจะมีการปลุก ซึ่งโดยปกติแล้ว
ด้วยการแจ้งหรือรบกวน หรือจนกว่า
เวลาแบบเรียลไทม์ผ่านไปแล้ว
|
final
void
|
wait(long timeoutMillis)
ทำให้เทรดปัจจุบันต้องรอจนกว่าจะมีการปลุก ซึ่งโดยปกติแล้ว
ด้วยการแจ้งหรือรบกวน หรือจนกว่า
เวลาแบบเรียลไทม์ผ่านไปแล้ว
|
final
void
|
wait()
ทำให้เทรดปัจจุบันต้องรอจนกว่าจะมีการปลุก ซึ่งโดยปกติแล้ว
ด้วยการแจ้งหรือรบกวน
|
|
ช่างก่อสร้างสาธารณะ
นักสร้าง
public Builder (List<Topic> topics)
สร้าง Builder
สำหรับ GetTopicsResponse
ออบเจ็กต์
พารามิเตอร์ |
topics |
List : รายการ Topics ที่แสดงผล
ค่านี้ต้องไม่เป็น null |
วิธีการสาธารณะ
บิลด์
public GetTopicsResponse build ()
สร้างอินสแตนซ์ GetTopicsResponse
จะใส่ IllegalArgumentException หากมีพารามิเตอร์ที่ไม่มีข้อมูลหรือไม่ตรงกัน
ในขนาดของ ModelVersions และ TaxonomyVersions
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา Java และ OpenJDK เป็นเครื่องหมายการค้าหรือเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-27 UTC
[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2025-07-27 UTC"],[],[],null,["# GetTopicsResponse.Builder\n\nAdded in [API level 34](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nAlso in [Ad Services Extensions 4](/sdkExtensions) \nSummary: [Ctors](#pubctors) \\| [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \n\nGetTopicsResponse.Builder\n=========================\n\n\n`\npublic\nstatic\nfinal\n\nclass\nGetTopicsResponse.Builder\n`\n\n\n`\n\nextends `[Object](/reference/java/lang/Object)`\n\n\n`\n\n`\n\n\n`\n\n|---|-----------------------------------------------------|\n| [java.lang.Object](/reference/java/lang/Object) ||\n| ↳ | android.adservices.topics.GetTopicsResponse.Builder |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nBuilder for [GetTopicsResponse](/design-for-safety/privacy-sandbox/reference/adservices/topics/GetTopicsResponse) objects. This class should be used in test\nimplementation as expected response from Topics API\n\nSummary\n-------\n\n| ### Public constructors ||\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[Builder](/design-for-safety/privacy-sandbox/reference/adservices/topics/GetTopicsResponse.Builder#Builder(java.util.List\u003candroid.adservices.topics.Topic\u003e))`(`[List](/reference/java/util/List)`\u003c`[Topic](/design-for-safety/privacy-sandbox/reference/adservices/topics/Topic)`\u003e topics) ` Creates a [Builder](/design-for-safety/privacy-sandbox/reference/adservices/topics/GetTopicsResponse.Builder) for [GetTopicsResponse](/design-for-safety/privacy-sandbox/reference/adservices/topics/GetTopicsResponse) objects. |\n\n| ### Public methods ||\n|----------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` `[GetTopicsResponse](/design-for-safety/privacy-sandbox/reference/adservices/topics/GetTopicsResponse) | ` `[build](/design-for-safety/privacy-sandbox/reference/adservices/topics/GetTopicsResponse.Builder#build())`() ` Builds a [GetTopicsResponse](/design-for-safety/privacy-sandbox/reference/adservices/topics/GetTopicsResponse) instance. |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` `[java.lang.Object](/reference/java/lang/Object)` ` |---------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](/reference/java/lang/Object) | ` `[clone](/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object. | | ` boolean` | ` `[equals](/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](/reference/java/lang/Object)` obj) ` Indicates whether some other object is \"equal to\" this one. | | ` void` | ` `[finalize](/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final `[Class](/reference/java/lang/Class)`\u003c?\u003e` | ` `[getClass](/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this `Object`. | | ` int` | ` `[hashCode](/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object. | | ` final void` | ` `[notify](/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` `[notifyAll](/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor. | | ` `[String](/reference/java/lang/String) | ` `[toString](/reference/java/lang/Object#toString())`() ` Returns a string representation of the object. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait(long,%20int))`(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](/reference/java/lang/Object#wait(long))`(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](/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||\n\nPublic constructors\n-------------------\n\n### Builder\n\nAdded in [API level 34](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nAlso in [Ad Services Extensions 4](/sdkExtensions) \n\n```\npublic Builder (List\u003cTopic\u003e topics)\n```\n\nCreates a [Builder](/design-for-safety/privacy-sandbox/reference/adservices/topics/GetTopicsResponse.Builder) for [GetTopicsResponse](/design-for-safety/privacy-sandbox/reference/adservices/topics/GetTopicsResponse) objects.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------|------------------------------------------------------------------------------|\n| `topics` | `List`: The list of the returned Topics. This value cannot be `null`. \u003cbr /\u003e |\n\nPublic methods\n--------------\n\n### build\n\nAdded in [API level 34](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nAlso in [Ad Services Extensions 4](/sdkExtensions) \n\n```\npublic GetTopicsResponse build ()\n```\n\nBuilds a [GetTopicsResponse](/design-for-safety/privacy-sandbox/reference/adservices/topics/GetTopicsResponse) instance.\n\nthrows IllegalArgumentException if any of the params are null or there is any mismatch\nin the size of ModelVersions and TaxonomyVersions.\n\n\u003cbr /\u003e\n\n| Returns ||\n|-------------------------------------------------------------------------------------------------------|--------|\n| [GetTopicsResponse](/design-for-safety/privacy-sandbox/reference/adservices/topics/GetTopicsResponse) | \u003cbr /\u003e |"]]