nl_tokens: Translates the source position to an actual position within the adapter wrapper . @param fetchedAdsCount the count of completely fetched ads that are ready to be published @param sourcePos the source index
pl_tokens: public int translateSourceIndexToWrapperPosition ( int sourcePos , int fetchedAdsCount ) { int adSpacesCount = 0 ; if ( sourcePos >= getOffsetValue ( ) && getNoOfDataBetweenAds ( ) > 0 ) adSpacesCount = ( sourcePos - getOffsetValue ( ) ) / getNoOfDataBetweenAds ( ) + 1 ; adSpacesCount = Math . <mask> ( fetchedAdsCount , adSpacesCount ) ; adSpacesCount = Math . max ( 0 , adSpacesCount ) ; adSpacesCount = Math . min ( adSpacesCount , getLimitOfAds ( ) ) ; int wrappedPosition = sourcePos + adSpacesCount ; return wrappedPosition ; }