Moves the detail page information for a given page to the front of the detail pages for the same type.<p>

@param id a page id

@return the original position of the detail page entry in the list for the same type
481814
public int bump(CmsUUID id) {

        CmsDetailPageInfo info = m_infoById.get(id);
        if (info == null) {
            throw new IllegalArgumentException();
        }
        String type = info.getType();
        List<CmsDetailPageInfo> infos = m_map.get(type);
        int oldPos = infos.indexOf(info);
        infos.remove(oldPos);
        infos.add(0, info);
        return oldPos;
    }
1312989
public CmsCategoryTreeEntry getEntryById(CmsUUID id) {

        for (CmsCategoryTreeEntry entry : getFlatList()) {
            if (id.equals(entry.getId())) {
                return entry;
            }
        }
        return null;
    }
1011808
final protected AbstractIndexPage getPrevLeafPage(AbstractIndexPage indexPage) {
		int pos = getPagePosition(indexPage);
		if (pos > 0) {
			AbstractIndexPage page = getPageByPos(pos-1);
			return page.getLastLeafPage();
		}
		if (getParent() == null) {
			return null;
		}
		//TODO we really should return the last leaf page of the previous inner page.
		//But if they get merged, then we have to shift minimal values, which is
		//complicated. For now we ignore this case, hoping that it doesn't matter much.
		return null;
	}
823651
public Status getStatus(CmsUUID id) {

        CmsDetailPageInfo info = m_infoById.get(id);
        if (info == null) {
            return Status.noDetailPage;
        }
        String type = info.getType();
        int index = m_map.get(type).indexOf(info);
        if (index == 0) {
            return Status.firstDetailPage;
        }
        return Status.otherDetailPage;
    }
615467
@Override
    public Page<Alert> previousPage(final Page<Alert> page, 
                                    final TwilioRestClient client) {
        Request request = new Request(
            HttpMethod.GET,
            page.getPreviousPageUrl(
                Domains.MONITOR.toString(),
                client.getRegion()
            )
        );
        return pageForRequest(client, request);
    }
472506
@Override
    public Page<Variable> previousPage(final Page<Variable> page, 
                                       final TwilioRestClient client) {
        Request request = new Request(
            HttpMethod.GET,
            page.getPreviousPageUrl(
                Domains.SERVERLESS.toString(),
                client.getRegion()
            )
        );
        return pageForRequest(client, request);
    }
1248633
public Point removePoint(String id) {
        Point removePoint = null;
        for (Point point : points)
            if (id.equals(point.getId()))
                removePoint = point;
        if (removePoint != null)
            points.remove(removePoint);
        return removePoint;
    }
576277
protected AbstractIndexPage getPageByPos(int pos) {
		AbstractIndexPage page = subPages[pos];
		if (page != null) {
			return page;
		}
		page = ind.readPage(subPageIds[pos], this);
		subPages[pos] = page;
		return page;
	}
802578
public long getPosition() {
        long file_pos = 0;
        UnifiedDataPageX page = _buffer.getCurrentPage();
        if (page != null) {
            file_pos = page.getFilePosition(_pos);
        }
        return file_pos;
    }
746392
public Page<T> previousPage(final Page<T> page) {
        return previousPage(page, Twilio.getRestClient());
    }
1145879
def page_prev(self):
        """"""
        window_start = (self.parent.value('window_start') -
                        self.parent.value('window_length'))
        if window_start < 0:
            return
        self.parent.overview.update_position(window_start)
819061
public void addDetailPageInfo(CmsDetailPageInfo info) {

        m_detailPageTable.add(info);
        m_allDetailPageInfos.put(info.getId(), info);
    }
638387
public Permalink findNearest(String id) {
        List<String> ids = new ArrayList<>();
        for (Permalink p : this)
            ids.add(p.getId());
        String nearest = EditDistance.findNearest(id, ids);
        if(nearest==null)   return null;
        return get(nearest);
    }
811740
private boolean isLastPage(CmsClientSitemapEntry entry) {

        return ((entry.isInNavigation() && (entry.getId().toString().equals(m_controller.getData().getReturnCode())))
            || ((entry.getDefaultFileId() != null)
                && entry.getDefaultFileId().toString().equals(m_controller.getData().getReturnCode())));
    }
389748
public void move(CmsClientSitemapEntry entry, String toPath, int position) {

        // check for valid data
        if (!isValidEntryAndPath(entry, toPath)) {
            // invalid data, do nothing
            CmsDebugLog.getInstance().printLine("invalid data, doing nothing");
            return;
        }
        // check for relevance
        if (isChangedPosition(entry, toPath, position)) {
            // only register real changes
            CmsSitemapChange change = new CmsSitemapChange(entry.getId(), entry.getSitePath(), ChangeType.modify);
            change.setDefaultFileId(entry.getDefaultFileId());
            if (!toPath.equals(entry.getSitePath())) {
                change.setParentId(getEntry(CmsResource.getParentFolder(toPath)).getId());
                change.setName(CmsResource.getName(toPath));
            }
            if (CmsSitemapView.getInstance().isNavigationMode()) {
                change.setPosition(position);
            }
            change.setLeafType(entry.isLeafType());
            CmsSitemapClipboardData data = getData().getClipboardData().copy();
            data.addModified(entry);
            change.setClipBoardData(data);
            commitChange(change, null);
        }
    }
484942
@VisibleForTesting
    public int findPositionOf(ByteBuffer context, CounterId id)
    {
        int headerLength = headerLength(context);
        int offset = context.position() + headerLength;

        int left = 0;
        int right = (context.remaining() - headerLength) / STEP_LENGTH - 1;

        while (right >= left)
        {
            int middle = (left + right) / 2;
            int cmp = compareId(context, offset + middle * STEP_LENGTH, id.bytes(), id.bytes().position());

            if (cmp == -1)
                left = middle + 1;
            else if (cmp == 0)
                return offset + middle * STEP_LENGTH;
            else
                right = middle - 1;
        }

        return -1; // position not found
    }
1288829
public <V extends View> V get(int id) {
        Object result = mViews.get(id);

        if (result == NULL) {
            return null;
        }

        if (result != null) {
            return cast(result);
        }

        result = mView.findViewById(id);

        if (result == null) {
            mViews.put(id, NULL);
        } else {
            mViews.put(id, result);
        }

        return cast(result);
    }