0
我正在使用JSoup來解析網頁。JSoup:不存在類型變量的實例,以便字符串符合元素
這是我的代碼:
List<Element> nodes = inodes.stream()
.filter(n -> n.child(0).text().contains("hello"))
.map(n -> n.data())
.collect(Collectors.toList());
當我運行它,我得到這個錯誤:
equality constraints: Element
lower bounds: String
where T is a type-variable:
T extends Object declared in method <T>toList()
如何解決這個問題?