FrequencyCapFilters.Builder

public static final class FrequencyCapFilters.Builder
extends Object

java.lang.Object
   ↳ android.adservices.common.FrequencyCapFilters.Builder


用于创建 FrequencyCapFilters 对象的构建器。

摘要

公共构造函数

Builder()

公共方法

FrequencyCapFilters build()

构建并返回 FrequencyCapFilters 实例。

FrequencyCapFilters.Builder setKeyedFrequencyCapsForClickEvents(List<KeyedFrequencyCap> keyedFrequencyCapsForClickEvents)

设置将按 FrequencyCapFilters.AD_EVENT_TYPE_CLICK 事件类型过滤的 KeyedFrequencyCap 对象列表。

FrequencyCapFilters.Builder setKeyedFrequencyCapsForImpressionEvents(List<KeyedFrequencyCap> keyedFrequencyCapsForImpressionEvents)

设置将按 FrequencyCapFilters.AD_EVENT_TYPE_IMPRESSION 事件类型过滤的 KeyedFrequencyCap 对象列表。

FrequencyCapFilters.Builder setKeyedFrequencyCapsForViewEvents(List<KeyedFrequencyCap> keyedFrequencyCapsForViewEvents)

设置将按 FrequencyCapFilters.AD_EVENT_TYPE_VIEW 事件类型过滤的 KeyedFrequencyCap 对象列表。

FrequencyCapFilters.Builder setKeyedFrequencyCapsForWinEvents(List<KeyedFrequencyCap> keyedFrequencyCapsForWinEvents)

设置将按 FrequencyCapFilters.AD_EVENT_TYPE_WIN 事件类型过滤的 KeyedFrequencyCap 对象列表。

继承的方法

公共构造函数

公共方法

build

public FrequencyCapFilters build ()

构建并返回 FrequencyCapFilters 实例。

与单个广告相关联的频次上限过滤器不能超过 20 个。如果 过滤器总数超出设置的上限,将出现 IllegalArgumentException

返回
FrequencyCapFilters 此值不能为 null

setKeyedFrequencyCapsForClickEvents

public FrequencyCapFilters.Builder setKeyedFrequencyCapsForClickEvents (List<KeyedFrequencyCap> keyedFrequencyCapsForClickEvents)

设置将按 FrequencyCapFilters.AD_EVENT_TYPE_CLICK 事件类型过滤的 KeyedFrequencyCap 对象列表。

如需了解详情,请参阅 FrequencyCapFilters.getKeyedFrequencyCapsForClickEvents()

参数
keyedFrequencyCapsForClickEvents List:此值不能为 null

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

setKeyedFrequencyCapsForImpressionEvents

public FrequencyCapFilters.Builder setKeyedFrequencyCapsForImpressionEvents (List<KeyedFrequencyCap> keyedFrequencyCapsForImpressionEvents)

设置将按 FrequencyCapFilters.AD_EVENT_TYPE_IMPRESSION 事件类型过滤的 KeyedFrequencyCap 对象列表。

如需了解详情,请参阅 FrequencyCapFilters.getKeyedFrequencyCapsForImpressionEvents()

参数
keyedFrequencyCapsForImpressionEvents List:此值不能为 null

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

setKeyedFrequencyCapsForViewEvents

public FrequencyCapFilters.Builder setKeyedFrequencyCapsForViewEvents (List<KeyedFrequencyCap> keyedFrequencyCapsForViewEvents)

设置将按 FrequencyCapFilters.AD_EVENT_TYPE_VIEW 事件类型过滤的 KeyedFrequencyCap 对象列表。

如需了解详情,请参阅 FrequencyCapFilters.getKeyedFrequencyCapsForViewEvents()

参数
keyedFrequencyCapsForViewEvents List:此值不能为 null

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

setKeyedFrequencyCapsForWinEvents

public FrequencyCapFilters.Builder setKeyedFrequencyCapsForWinEvents (List<KeyedFrequencyCap> keyedFrequencyCapsForWinEvents)

设置将按 FrequencyCapFilters.AD_EVENT_TYPE_WIN 事件类型过滤的 KeyedFrequencyCap 对象列表。

如需了解详情,请参阅 FrequencyCapFilters.getKeyedFrequencyCapsForWinEvents()

参数
keyedFrequencyCapsForWinEvents List:此值不能为 null

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