示例#1
0
  public boolean upPartIfContained(
      int userPage, int page, float width, float height, RectF pageRelativeBounds, int toOrder) {
    PagePart fakePart =
        new PagePart(userPage, page, null, width, height, pageRelativeBounds, false, 0);

    PagePart found;
    if ((found = find(passiveCache, fakePart)) != null) {
      passiveCache.remove(found);
      found.setCacheOrder(toOrder);
      activeCache.offer(found);
      return true;
    }

    return find(activeCache, fakePart) != null;
  }