Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
您可以map在过滤相关类型后使用该功能。
map
val filteredSomethings:List<Something> = someTypeSet.filter { something -> setOfSomeTypeIds.contains(something.id) }.map { Something(it.id) }
它将返回Something具有相关 ID 的列表。
Something