Lazy view of java.util.Collection in Vavr
问题 I have an existing api which uses java.util.Collection when returning values. I would like to use those values in later parts of my program with Vavr but I don't want to use the eager methods like List.ofAll (because I do not want to traverse those Collection objects twice). My use case is something like this: List<Product> filter(java.util.Collection products) { return List.lazyOf(products).filter(pred1); } Is it possible? 回答1: Since the input collection to the method is a java Collection ,