Default Methods


Idioms and Techniques

Design Rationale

Advanced Questions

Why are Stream operations not defined directly on Collection?

Early drafts of the API exposed methods like filter, map, and reduce on Collection or Iterable. However, user experience with this design led to a more formal separation of the “stream” methods into their own abstraction. Reasons included: Methods on Collection such as removeAll make in-place modifications, in contrast to the new methods which are […]