如何使用Java Stream Api替換此代碼?Java Stream Api INNER JOIN兩個列表
for (Book book : Books.getAllBooks()) {
for (SearchResult searchResult : searchResultList) {
if (searchResult.getTableName().replace("attr_", "") .equals(book.getTableName())) {
bookList.add(book);
}
}
}
那你試試? – Tunaki