AdFilters


class AdFilters : Parcelable
kotlin.Any
   ↳ android.adservices.common.AdFilters

A container class for filters which are associated with an ad.

If any of the filters in an AdFilters instance are not satisfied, the associated ad will not be eligible for ad selection. Filters are optional ad parameters and are not required as part of AdData.

Summary

Nested classes

Builder for creating AdFilters objects.

Inherited constants
Public methods
Boolean
equals(other: Any?)

Checks whether the AdFilters objects represent the same set of filters.

AppInstallFilters?

Gets the AppInstallFilters instance that represents all app install filters for the ad.

FrequencyCapFilters?

Gets the FrequencyCapFilters instance that represents all frequency cap filters for the ad.

Int

Returns the hash of the AdFilters object's data.

String

Unit
writeToParcel(dest: Parcel, flags: Int)

Flatten this object in to a Parcel.

Properties
static Parcelable.Creator<AdFilters!>

Public methods

equals

Added in API level 35
fun equals(other: Any?): Boolean

Checks whether the AdFilters objects represent the same set of filters.

Parameters
obj the reference object with which to compare.
Return
Boolean true if this object is the same as the obj argument; false otherwise.

getAppInstallFilters

fun getAppInstallFilters(): AppInstallFilters?

Gets the AppInstallFilters instance that represents all app install filters for the ad.

If null, there are no app install filters which apply to the ad.

getFrequencyCapFilters

fun getFrequencyCapFilters(): FrequencyCapFilters?

Gets the FrequencyCapFilters instance that represents all frequency cap filters for the ad.

If null, there are no frequency cap filters which apply to the ad.

hashCode

Added in API level 35
fun hashCode(): Int

Returns the hash of the AdFilters object's data.

Return
Int a hash code value for this object.

toString

Added in API level 35
fun toString(): String
Return
String a string representation of the object.

writeToParcel

Added in API level 35
fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit

Flatten this object in to a Parcel.

Parameters
dest Parcel: This value cannot be null.
flags Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Properties

CREATOR

static val CREATOR: Parcelable.Creator<AdFilters!>