我正在尝试创建一个新的Page使用从数据库中检索到的对象列表。首先,我从数据库中获取所有元素,将其转换为Stream,然后使用lambda过滤结果。然后我需要一个具有一定数量元素的页面,但是,实例化一个新的PageImpl似乎没有返回大小正确的页面。这是我的代码:ListlistaFinal;Streamstream=produtosRepository.findAll().stream();listaFinal=stream.filter(p->p.getProdNome().contains("uio")).collect(Collectors.toList());longtota