Skip to content

Improve Iterables doc around migrating to Stream #5840

Open
@cpovirk

Description

@cpovirk

We're seeing some evidence that people are interpreting the current text as "You should always choose Stream over Iterables" and even as "Iterables is effectively deprecated."

I don't remember all the history, but at a minimum, I don't think we want to suggest "effectively deprecated," if only because of methods like mergeSorted that don't have clean Stream equivalents.

Even beyond that, I don't really see much wrong with getOnlyElement.

(On the flip side, possibly we should document an equivalent to Iterables.toString, which I think is fairly straightforward, even though it uses the 3-arg Collectors.joining, which forces you to figure out the right order of arguments.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions