public class AdUnitMapper
extends java.lang.Object
| Constructor and Description |
|---|
AdUnitMapper(AndroidUtil androidUtil,
DeviceUtil deviceUtil) |
| Modifier and Type | Method and Description |
|---|---|
com.criteo.publisher.model.CacheAdUnit |
map(com.criteo.publisher.model.AdUnit adUnit)
Transform the given
AdUnit into an internal CacheAdUnit if valid |
java.util.List<java.util.List<com.criteo.publisher.model.CacheAdUnit>> |
mapToChunks(java.util.List<com.criteo.publisher.model.AdUnit> adUnits)
Transform the given valid
AdUnit into internal CacheAdUnit. |
public AdUnitMapper(AndroidUtil androidUtil, DeviceUtil deviceUtil)
public java.util.List<java.util.List<com.criteo.publisher.model.CacheAdUnit>> mapToChunks(@NonNull
java.util.List<com.criteo.publisher.model.AdUnit> adUnits)
AdUnit into internal CacheAdUnit.
Valid ad units are transformed and collected while invalid ad units are ignored. See map(AdUnit) for validity rules.
Collected ad units are then grouped into chunks to load.
adUnits - to transform@Nullable
public com.criteo.publisher.model.CacheAdUnit map(@Nullable
com.criteo.publisher.model.AdUnit adUnit)
AdUnit into an internal CacheAdUnit if valid
The given ad unit is considered valid if all those conditions are met:
If the ad unit is not valid, then null is returned instead.
adUnit - to transformnull if given ad unit is invalid