google / guava

Google core libraries for Java
Apache License 2.0
49.98k stars 10.85k forks source link

Iterators: support transform() with JDK Function class #7302

Open reschke opened 1 month ago

reschke commented 1 month ago

Currently:

https://guava.dev/releases/snapshot-jre/api/docs/com/google/common/collect/Iterators.html#transform(java.util.Iterator,com.google.common.base.Function)

...would be good to relax that to

transform(java.util.Iterator,java.util.function.Function)

so it becomes easier to migrate away from Guava Function class.

cpovirk commented 1 month ago

Thanks. We may do this eventually for at least some of our APIs. (previously: https://github.com/google/guava/issues/2758)

Some things we'd want to consider:

reschke commented 1 month ago

Thanks for the pointers. That makes it indeed easier.