FrequencyCapFilters.Builder


public static final class FrequencyCapFilters.Builder
extends Object

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


Builder for creating FrequencyCapFilters objects.

Summary

Public constructors

Builder()

Public methods

FrequencyCapFilters build()

Builds and returns a FrequencyCapFilters instance.

FrequencyCapFilters.Builder setKeyedFrequencyCapsForClickEvents(List<KeyedFrequencyCap> keyedFrequencyCapsForClickEvents)

Sets the list of KeyedFrequencyCap objects that will filter on the FrequencyCapFilters.AD_EVENT_TYPE_CLICK event type.

FrequencyCapFilters.Builder setKeyedFrequencyCapsForImpressionEvents(List<KeyedFrequencyCap> keyedFrequencyCapsForImpressionEvents)

Sets the list of KeyedFrequencyCap objects that will filter on the FrequencyCapFilters.AD_EVENT_TYPE_IMPRESSION event type.

FrequencyCapFilters.Builder setKeyedFrequencyCapsForViewEvents(List<KeyedFrequencyCap> keyedFrequencyCapsForViewEvents)

Sets the list of KeyedFrequencyCap objects that will filter on the FrequencyCapFilters.AD_EVENT_TYPE_VIEW event type.

FrequencyCapFilters.Builder setKeyedFrequencyCapsForWinEvents(List<KeyedFrequencyCap> keyedFrequencyCapsForWinEvents)

Sets the list of KeyedFrequencyCap objects that will filter on the FrequencyCapFilters.AD_EVENT_TYPE_WIN event type.

Inherited methods

Public constructors

Builder

public Builder ()

Public methods

build

public FrequencyCapFilters build ()

Builds and returns a FrequencyCapFilters instance.

No more than 20 frequency cap filters may be associated with a single ad. If more total filters than the limit have been set, an IllegalArgumentException will be thrown.

Returns
FrequencyCapFilters This value cannot be null.

setKeyedFrequencyCapsForClickEvents

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

Sets the list of KeyedFrequencyCap objects that will filter on the FrequencyCapFilters.AD_EVENT_TYPE_CLICK event type.

See FrequencyCapFilters.getKeyedFrequencyCapsForClickEvents() for more information.

Parameters
keyedFrequencyCapsForClickEvents List: This value cannot be null.

Returns
FrequencyCapFilters.Builder This value cannot be null.

setKeyedFrequencyCapsForImpressionEvents

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

Sets the list of KeyedFrequencyCap objects that will filter on the FrequencyCapFilters.AD_EVENT_TYPE_IMPRESSION event type.

See FrequencyCapFilters.getKeyedFrequencyCapsForImpressionEvents() for more information.

Parameters
keyedFrequencyCapsForImpressionEvents List: This value cannot be null.

Returns
FrequencyCapFilters.Builder This value cannot be null.

setKeyedFrequencyCapsForViewEvents

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

Sets the list of KeyedFrequencyCap objects that will filter on the FrequencyCapFilters.AD_EVENT_TYPE_VIEW event type.

See FrequencyCapFilters.getKeyedFrequencyCapsForViewEvents() for more information.

Parameters
keyedFrequencyCapsForViewEvents List: This value cannot be null.

Returns
FrequencyCapFilters.Builder This value cannot be null.

setKeyedFrequencyCapsForWinEvents

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

Sets the list of KeyedFrequencyCap objects that will filter on the FrequencyCapFilters.AD_EVENT_TYPE_WIN event type.

See FrequencyCapFilters.getKeyedFrequencyCapsForWinEvents() for more information.

Parameters
keyedFrequencyCapsForWinEvents List: This value cannot be null.

Returns
FrequencyCapFilters.Builder This value cannot be null.