You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks. We may do this eventually for at least some of our APIs. (previously: #2758)
Some things we'd want to consider:
We can't do this for our Android flavor until our Function extends the JDK Function there (as it already does in the JRE flavor). Otherwise, calls that pass lambdas would become ambiguous.
We discourage use of our transform and filter methods in favor of Stream nowadays. (We should really add a warning to Iterators similar to the one on https://guava.dev/Iterables.) It would be somewhat sad to make some of the discouraged methods in Iterators take up twice as much space in the Javadoc while leaving the handful that we still encourage alone.
Migrating is usually still relatively straightforward because you can use function::apply to adapt back and forth. Still, it's clearly true that it would be better not to have to :)
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.
The text was updated successfully, but these errors were encountered: