Moves the current cursor position or hides it. If the cursor is hidden and given a new position, it will be
visible after this method call.

@param position 0-indexed column and row numbers of the new position, or if {@code null}, hides the cursor
330570
@Override
    public void setCursorPosition(TerminalPosition position) {
        if(position == null) {
            //Skip any validation checks if we just want to hide the cursor
            this.cursorPosition = null;
            return;
        }
        if(position.getColumn() < 0) {
            position = position.withColumn(0);
        }
        if(position.getRow() < 0) {
            position = position.withRow(0);
        }
        if(position.getColumn() >= terminalSize.getColumns()) {
            position = position.withColumn(terminalSize.getColumns() - 1);
        }
        if(position.getRow() >= terminalSize.getRows()) {
            position = position.withRow(terminalSize.getRows() - 1);
        }
        this.cursorPosition = position;
    }
1129049
public void toggleSelection(int position) {
        if (mFastAdapter.getItem(position).isSelected()) {
            deselect(position);
        } else {
            select(position);
        }
    }
493414
public boolean setPosition(float position) {
		if (playing) {
			requiredPosition = -1;
			
			positioning = true;
			playing = false;
			boolean result = sound.setPosition(position);
			playing = true;
			positioning = false;

			return result;
		} else {
			requiredPosition = position;
			return false;
		}
	}
593997
public T setSelection(int position) {

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

        return self();

    }
8301
public void setSplitterPosition(int position) {
        mSplitterPosition = clamp(position, 0, Integer.MAX_VALUE);
        mSplitterPositionPercent = -1;
        remeasure();
        notifySplitterPositionChanged(false);
    }
258285
def go_to_position(self, position):
        

        cursor = self.textCursor()
        cursor.setPosition(position)
        self.setTextCursor(cursor)
        return True
311367
protected void moveUp(int pos)
  {
//    if (tc.isEntryEnabled())
//      SibTr.entry(tc, "moveUp", new Integer(pos));

    PriorityQueueNode node = elements[pos];
    long priority = node.priority;

    while ((pos > 0) && (elements[parent(pos)].priority > priority))
    {
      setElement(elements[parent(pos)], pos);
      pos = parent(pos);
    }

    setElement(node, pos);

//    if (tc.isEntryEnabled())
//      SibTr.exit(tc, "moveUp");
  }
420204
public void setSelection(int position) {
		if(mAdapter != null)
			position = Math.max(0, Math.min(position, mAdapter.getCount() - 1));

		if(mSelectedPosition != position){
			mSelectedPosition = position;

			if(mOnItemSelectedListener != null)
				mOnItemSelectedListener.onItemSelected(this, getSelectedView(), position, mAdapter == null ? -1 : mAdapter.getItemId(position));

			onDataInvalidated();
		}
	}
1373807
protected void onItemClick(View view, int position){
        if(itemClickListener != null) itemClickListener.onItemClick(view, getItem(position), position);
    }
388224
def cursor_position(self, value):
        
        assert isinstance(value, int)
        assert value <= len(self.text)

        changed = self._set_cursor_position(value)

        if changed:
            self._cursor_position_changed()
64653
public void onBindView(@Nullable T item, int position) {
        mObject = item;
        mLastBindPosition = position;
        updateView(mCacheView.getView().getContext(), mObject);
    }
851453
public void moveCursorLine (int line) {
		if (line < 0) {
			cursorLine = 0;
			cursor = 0;
			moveOffset = -1;
		} else if (line >= getLines()) {
			int newLine = getLines() - 1;
			cursor = text.length();
			if (line > getLines() || newLine == cursorLine) {
				moveOffset = -1;
			}
			cursorLine = newLine;
		} else if (line != cursorLine) {
			if (moveOffset < 0) {
				moveOffset = linesBreak.size <= cursorLine * 2 ? 0
						: glyphPositions.get(cursor) - glyphPositions.get(linesBreak.get(cursorLine * 2));
			}
			cursorLine = line;
			cursor = cursorLine * 2 >= linesBreak.size ? text.length() : linesBreak.get(cursorLine * 2);
			while (cursor < text.length() && cursor <= linesBreak.get(cursorLine * 2 + 1) - 1
					&& glyphPositions.get(cursor) - glyphPositions.get(linesBreak.get(cursorLine * 2)) < moveOffset) {
				cursor++;
			}
			showCursor();
		}
	}
988280
protected void removeBy(int position) {
        if (mGroupBasicAdapter != null) {
            if (position < mGroupBasicAdapter.getItemCount() && position >= 0) {
                BaseCell removeCell = mGroupBasicAdapter.getItemByPosition(position);
                removeBy(removeCell);
            }
        }
    }
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);
    }
744545
public void setPosition(Long pos) {
        Interval interval = getInterval();
        if (interval != null) {
            resetInterval(pos, interval.getStartGranularity());
        } else {
            resetInterval(pos, null);
        }
    }
185094
public void setPosition(final Object targetObj, final CellPosition position) {
        
        ArgUtils.notNull(targetObj, "targetObj");
        ArgUtils.notNull(position, "position");
        
        positionSetter.ifPresent(setter -> setter.set(targetObj, position));
    }
344906
public synchronized void seek(long position) throws IOException {
    if (position < 0 || position >= count) {
      throw new IOException("cannot seek position " + position + " as it is out of bounds");
    }
    pos = (int) position;
  }