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

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(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(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()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

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.