Get the first item returned by {@link #getPages(Predicate, Page)} or null if list is empty
@param filter the resource filter
@param basePage the suffix path is relative to this page path (null for current page)
@return the first {@link Page} or null
358571
public @Nullable Page getPage(@Nullable Predicate<Page> filter, @Nullable Page basePage) {
    List<Page> suffixPages = getPages(filter, basePage);
    if (suffixPages.isEmpty()) {
      return null;
    }
    else {
      return suffixPages.get(0);
    }
  }
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;
	}
395624
public static SearchRequest newLdaptiveSearchRequest(final String baseDn,
                                                         final SearchFilter filter) {
        return newLdaptiveSearchRequest(baseDn, filter, ReturnAttributes.ALL_USER.value(), ReturnAttributes.ALL_USER.value());
    }
226648
public List<VirtualFile> getChildren(VirtualFileFilter filter) throws IOException {
        // isDirectory does the read security check
        if (!isDirectory()) { return Collections.emptyList(); }
        if (filter == null) { filter = MatchAllVirtualFileFilter.INSTANCE; }
        FilterVirtualFileVisitor visitor = new FilterVirtualFileVisitor(filter, null);
        visit(visitor);
        return visitor.getMatched();
    }
1128204
public ServerFilter where(Predicate<ServerMetadata> filter) {
        checkNotNull(filter, "Filter must be not a null");

        predicate = predicate.and(filter);

        return this;
    }
1124460
public Collection<Link> links(LinkFilter filter) {
        return get(Link.class, (filter != null) ? filter : new LinkFilter());
    }
554266
public static vpnurl[] get_filtered(nitro_service service, String filter) throws Exception{
		vpnurl obj = new vpnurl();
		options option = new options();
		option.set_filter(filter);
		vpnurl[] response = (vpnurl[]) obj.getfiltered(service, option);
		return response;
	}
22780
public Query<S> query(Filter<S> filter) throws FetchException {
        return query(filter, null);
    }
399109
public List<Row> search(ExtendedFilter filter)
    {
        SecondaryIndexSearcher mostSelective = getHighestSelectivityIndexSearcher(filter.getClause());
        if (mostSelective == null)
            return Collections.emptyList();
        else
            return mostSelective.search(filter);
    }
387090
NodeIterator<T> getNodeIterator(Filter<T> filter) {
        return new NodeIterator<T>(root, filter, true);
    }
1224331
def get_uris(self, base_uri, filter_list=None):
        """"""
        return {
            re.sub(r'^/', base_uri, link.attrib['href'])
            for link in self.parsedpage.get_nodes_by_selector('a')
            if 'href' in link.attrib and (
                link.attrib['href'].startswith(base_uri) or
                link.attrib['href'].startswith('/')
            ) and
            not is_uri_to_be_filtered(link.attrib['href'], filter_list)
        }
803133
@Nullable
  public IVATItem findFirst (@Nonnull final Predicate <? super IVATItem> aFilter)
  {
    return CollectionHelper.findFirst (m_aAllVATItems.values (), aFilter);
  }
30491
public @NotNull List<Resource> getResources(@NotNull Resource baseResource) {
    return getResources((Predicate<Resource>)null, baseResource);
  }
449115
synchronized PageWrapper getRootPage() {
        return this.pageByOffset.values().stream()
                                .filter(page -> page.getParent() == null)
                                .findFirst().orElse(null);
    }
884438
public String getDetailPage(CmsObject cms, String pageRootPath, String originPath) {

        return getDetailPage(cms, pageRootPath, originPath, null);
    }
831193
public static Page<Computer> page(int page, int pageSize, String sortBy, String order, String filter) {
        return 
            find.where()
                .ilike("name", "%" + filter + "%")
                .orderBy(sortBy + " " + order)
                .fetch("company")
                .findPagingList(pageSize)
                .getPage(page);
    }
7701
public static lbroute[] get_filtered(nitro_service service, String filter) throws Exception{
		lbroute obj = new lbroute();
		options option = new options();
		option.set_filter(filter);
		lbroute[] response = (lbroute[]) obj.getfiltered(service, option);
		return response;
	}