public int translateSourceIndexToWrapperPosition(int sourcePos,int fetchedAdsCount){
  int adSpacesCount=0;
  if (sourcePos >= getOffsetValue() && getNoOfDataBetweenAds() > 0)   adSpacesCount=(sourcePos - getOffsetValue()) / getNoOfDataBetweenAds() + 1;
  adSpacesCount=Math.min(fetchedAdsCount,adSpacesCount);
  adSpacesCount=Math.max(0,adSpacesCount);
  adSpacesCount=Math.min(adSpacesCount,getLimitOfAds());
  int wrappedPosition=sourcePos + adSpacesCount;
  return wrappedPosition;
}

public int translateSourceIndexToWrapperPosition ( int sourcePos , int fetchedAdsCount ) { int adSpacesCount = 0 ; if ( sourcePos >= getOffsetValue ( ) && getNoOfDataBetweenAds ( ) > 0 ) adSpacesCount = ( sourcePos - getOffsetValue ( ) ) / getNoOfDataBetweenAds ( ) + 1 ; adSpacesCount = Math . min ( fetchedAdsCount , adSpacesCount ) ; adSpacesCount = Math . max ( 0 , adSpacesCount ) ; adSpacesCount = Math . min ( adSpacesCount , getLimitOfAds ( ) ) ; int wrappedPosition = sourcePos + adSpacesCount ; return wrappedPosition ; }
translates the source position to an actual position withing the adapter wrapper .
