已在 API 级别 34 中引入
也已在广告服务扩展 4 中引入

AdSelectionOutcome.Builder

public static final class AdSelectionOutcome.Builder
extends Object

java.lang.Object
   ↳ android.adservices.adselection.AdSelectionOutcome.Builder


AdSelectionOutcome 对象的构建器。

摘要

公共构造函数

Builder()

公共方法

AdSelectionOutcome build()

构建 AdSelectionOutcome 实例。

AdSelectionOutcome.Builder setAdSelectionId(long adSelectionId)

设置 mAdSelectionId。

AdSelectionOutcome.Builder setRenderUri(Uri renderUri)

设置 RenderUri。

继承的方法

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()

导致当前线程处于等待状态,直到其被唤醒,这通常是 通知中断

公共构造函数

Builder

已在 API 级别 34 中引入
也已在广告服务扩展 4 中引入
public Builder ()

公共方法

build

已在 API 级别 34 中引入
也已在广告服务扩展 4 中引入
public AdSelectionOutcome build ()

构建 AdSelectionOutcome 实例。

返回值
AdSelectionOutcome 此值不能为 null

抛出
IllegalArgumentException 如果未设置 adSelectionIid
NullPointerException 如果 RenderUri 为 null

setAdSelectionId

已在 API 级别 34 中引入
也已在广告服务扩展 4 中引入
public AdSelectionOutcome.Builder setAdSelectionId (long adSelectionId)

设置 mAdSelectionId。

参数
adSelectionId long

返回值
AdSelectionOutcome.Builder 此值不能为 null

setRenderUri

已在 API 级别 34 中引入
也已在广告服务扩展 4 中引入
public AdSelectionOutcome.Builder setRenderUri (Uri renderUri)

设置 RenderUri。

参数
renderUri Uri:此值不能为 null

返回值
AdSelectionOutcome.Builder 此值不能为 null