public class NativeAdArbiter extends Object implements INativeAdArbiter
Constructor and Description |
---|
NativeAdArbiter() |
Modifier and Type | Method and Description |
---|---|
int |
countAdsByPosition(int position)
Returns total number of ads that should have been placed from position
0 to the
specified position (inclusive). |
int |
countTotalAds(int itemCount)
Returns the total number of ads to show for the specified total number of items.
|
boolean |
shouldPlaceAd(int position,
int itemCount,
int adCount)
Returns whether an ad should be placed at the specified position.
|
public boolean shouldPlaceAd(int position, int itemCount, int adCount)
INativeAdArbiter
shouldPlaceAd
in interface INativeAdArbiter
position
- current position (excluding any ads placed)itemCount
- total number of itemsadCount
- total number of ads shown at previous positionspublic int countTotalAds(int itemCount)
INativeAdArbiter
countTotalAds
in interface INativeAdArbiter
itemCount
- total number of itemspublic int countAdsByPosition(int position)
INativeAdArbiter
0
to the
specified position (inclusive).countAdsByPosition
in interface INativeAdArbiter
position
- current position (excluding any ads placed)