fills the page on index {@code position}.
@param position the page index to fill the page.
496968
void fillPage(final int position) {
        if (Constants.DEBUG) {
            Log.d("InfiniteViewPager", "setup Page " + position);
            printPageModels("before newPage");
        }
        final PageModel<T> oldModel = mPageModels[position];
        final PageModel<T> newModel = createPageModel(position);
        if (oldModel == null || newModel == null) {
            Log.w(Constants.LOG_TAG, "fillPage no model found " + oldModel + " " + newModel);
            return;
        }
        // moving the new created views to the page of the viewpager
        oldModel.removeAllChildren();
        for (final View newChild : newModel.getChildren()) {
            newModel.removeViewFromParent(newChild);
            oldModel.addChild(newChild);
        }

        mPageModels[position].setIndicator(newModel.getIndicator());
    }
648727
public int getIndexForPosition(int position) {
        int nSections = 0;

        Set<Entry<String, Integer>> entrySet = mSections.entrySet();
        for(Entry<String, Integer> entry : entrySet) {
            if(entry.getValue() < position) {
                nSections++;
            }
        }

        return position - nSections;
    }
153482
public function setPosition($position)
	{
		if ( $position == $this->getPosition() ) { return; }

		$this->_values['pos'] = (int) $position;
		$this->setModified();
	}
992457
public boolean setPosition(long position) {
		try {
			long fileSize = reader.length();
			if (fileSize > position) {
				reader.seek(position);
				return true;
			} 
			
			logger.logp(Level.SEVERE, className, "setPosition", "HPEL_OffsetBeyondFileSize", new Object[]{file, Long.valueOf(position), Long.valueOf(fileSize)});
			
		} catch (IOException ex) {
			logger.logp(Level.SEVERE, className, "setPosition", "HPEL_ErrorSettingFileOffset", new Object[]{file, Long.valueOf(position), ex.getMessage()});
			// Fall through to return false.
		}
		return false;
	}
47859
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
    public void transformPage(View view, float position) {
        //Calculate real position (with padding)
        position -= (float) ((ViewPager) view.getParent()).getPaddingRight() / (float) view.getWidth();
        if (position <= -1.0f || position >= 1.0f) {
            view.setAlpha(0);
            view.setTranslationX(0);
        } else if (position < 0.0001f && position > -0.0001f) {
            view.setAlpha(1);
            view.setTranslationX(1);
        } else if (position <= 0.0f || position <= 1.0f) {
            //Get the page margin to calculate the alpha relatively to it
            float pageMargin = -(float) ((ViewPager) view.getParent()).getPageMargin() / (float) view.getWidth();
            float alpha = position / (1.0f - pageMargin);
            alpha = (alpha <= 0) ? alpha + 1 : 1 - alpha;
            view.setAlpha(alpha);
            //Reduce the translation by factor 2
            view.setTranslationX(-position * ((float) view.getWidth() / 1.5f));
        }
    }
948663
public void setPosition(CmsPositionBean position, CmsPositionBean buttonsPosition, Element containerElement) {

        m_position = position;
        Element parent = CmsDomUtil.getPositioningParent(getElement());
        Style style = getElement().getStyle();
        style.setRight(
            parent.getOffsetWidth()
                - ((buttonsPosition.getLeft() + buttonsPosition.getWidth()) - parent.getAbsoluteLeft()),
            Unit.PX);
        int top = buttonsPosition.getTop() - parent.getAbsoluteTop();
        if (top < 0) {
            top = 0;
        }
        style.setTop(top, Unit.PX);
    }
795715
public void eat() {
        int i;

        if (endPageIdx == 0) {
            position.update(endPage, start, end);
            start = end;
        } else {
            position.update(pages.get(0), start, pageSize);
            for (i = 1; i < endPageIdx; i++) {
                position.update(pages.get(i), 0, pageSize);
            }
            pages.shrink(endPageIdx);
            endPageIdx = 0;
            endPage = pages.get(0);
            start = end;
            position.update(endPage, 0, start);
        }
    }
1103980
public void setPosition(int pos) {
		if (pos < 0 || pos >= number)
			throw new IllegalArgumentException("Position " + pos + " out of range");
		position = pos;
		updateLocationDefinition(position);
		forwardButton.setEnabled(position < number - 1);
		backwardButton.setEnabled(position > 0);
		if (panel.getParent()!=null) positionChanged();
	}
554382
public final void notifyFooterItemChanged(int position) {
        if (position < 0 || position >= footerItemCount) {
            throw new IndexOutOfBoundsException("The given position " + position
                    + " is not within the position bounds for footer items [0 - "
                    + (footerItemCount - 1) + "].");
        }
        notifyItemChanged(position + headerItemCount + contentItemCount);
    }
49725
public void add(int position) {
    if (mtasPositionType.equals(POSITION_SINGLE)) {
      if (position != mtasPositionStart) {
        if (position == (mtasPositionStart + 1)) {
          mtasPositionType = POSITION_RANGE;
          mtasPositionEnd = position;
        } else if (position == (mtasPositionStart - 1)) {
          mtasPositionType = POSITION_RANGE;
          mtasPositionEnd = mtasPositionStart;
          mtasPositionStart = position;
        } else {
          mtasPositionType = POSITION_SET;
          SortedSet<Integer> list = new TreeSet<>();
          list.add(position);
          list.add(mtasPositionStart);
          mtasPositionList = ArrayUtils
              .toPrimitive(list.toArray(new Integer[list.size()]));
          mtasPositionStart = list.first();
          mtasPositionEnd = list.last();
        }
      }
    } else {
      SortedSet<Integer> list = new TreeSet<>();
      if (mtasPositionType.equals(POSITION_RANGE)) {
        mtasPositionType = POSITION_SET;
        for (int i = mtasPositionStart; i <= mtasPositionEnd; i++) {
          list.add(i);
        }
        list.add(position);
      } else if (mtasPositionType.equals(POSITION_SET)) {
        for (int p : mtasPositionList) {
          list.add(p);
        }
        list.add(position);
      }
      mtasPositionList = ArrayUtils
          .toPrimitive(list.toArray(new Integer[list.size()]));
      mtasPositionStart = list.first();
      mtasPositionEnd = list.last();
      if (list.size() == (1 + mtasPositionEnd - mtasPositionStart)) {
        mtasPositionType = POSITION_RANGE;
        mtasPositionList = null;
      }
    }
  }
1072560
public void position(long p) throws IOException {
        long blockStart = (input.position() - maxOffset) 
         / buffer.length * buffer.length;
        long blockEnd = blockStart + maxOffset;
        if ((p >= blockStart) && (p < blockEnd)) {
            // Desired position is somewhere inside current buffer
            long adj = p - blockStart;
            offset = (int)adj;
            return;
        }
        positionDirect(p);
    }
1130274
public void setPosition(Vector3f position) {
        setPosition(position.x, position.y, position.z);
    }
744545
public void setPosition(Long pos) {
        Interval interval = getInterval();
        if (interval != null) {
            resetInterval(pos, interval.getStartGranularity());
        } else {
            resetInterval(pos, null);
        }
    }
593997
public T setSelection(int position) {

        if (view instanceof AdapterView) {
            AdapterView<?> alv = (AdapterView<?>) view;
            alv.setSelection(position);
        }

        return self();

    }
571433
public void position(long p) throws IOException {
        if (p < 0) {
            throw new IOException("Negative seek offset.");
        }
        if (p > size) {
            throw new IOException("Desired position exceeds size.");
        }
        if (p < buffer.length) {
            // Only seek file if necessary
            if (position > buffer.length) {
                diskStream.position(0);
            }
        } else {
            diskStream.position(p - buffer.length);
        }
        this.position = p;
    }
415036
public void removeStickyFooterItemAtPosition(int position) {
        if (mDrawerBuilder.mStickyDrawerItems != null && mDrawerBuilder.mStickyDrawerItems.size() > position) {
            mDrawerBuilder.mStickyDrawerItems.remove(position);
        }

        DrawerUtils.rebuildStickyFooterView(mDrawerBuilder);
    }
1220453
public void setCurrentItem(int position) {
		if(mSelectedPosition != position){
			CheckedTextView tv = getTabView(mSelectedPosition);	
			if(tv != null)
				tv.setChecked(false);
		}
		
		mSelectedPosition = position;		
		CheckedTextView tv = getTabView(mSelectedPosition);				
		if(tv != null)
			tv.setChecked(true);	
		
		animateToTab(position);
	}