AdSelectionSignals


public final class AdSelectionSignals


This class holds JSON that will be passed into a JavaScript function during ad selection. Its contents are not used by FLEDGE platform code, but are merely validated and then passed to the appropriate JavaScript ad selection function.

Summary

Public constructors

Public methods

boolean
equals(Object other)

Compares this AdSelectionSignals to the specified object.

final @NonNull String

Any valid JSON string to create the AdSelectionSignals with.

int

Returns a hash code corresponding to the string representation of this class obtained by calling .toString.

@NonNull String

Public constructors

AdSelectionSignals

Added in 1.0.0
public AdSelectionSignals(@NonNull String signals)
Parameters
@NonNull String signals

Any valid JSON string to create the AdSelectionSignals with.

Public methods

equals

public boolean equals(Object other)

Compares this AdSelectionSignals to the specified object. The result is true if and only if the argument is not null and the signals property of the two objects are equal. Note that this method will not perform any JSON normalization so two AdSelectionSignals objects with the same JSON could be not equal if the String representations of the objects was not equal.

Parameters
Object other

The object to compare this AdSelectionSignals against

Returns
boolean

true if the given object represents an AdSelectionSignals equivalent to this AdSelectionSignals, false otherwise

getSignals

Added in 1.0.0
public final @NonNull String getSignals()

Any valid JSON string to create the AdSelectionSignals with.

hashCode

public int hashCode()

Returns a hash code corresponding to the string representation of this class obtained by calling .toString. Note that this method will not perform any JSON normalization so two AdSelectionSignals objects with the same JSON could have different hash codes if the underlying string representation was different.

Returns
int

a hash code value for this object.

toString

public @NonNull String toString()
Returns
@NonNull String

The String form of the JSON wrapped by this class.