These are my notes from watching the following video on Design Patterns Revisited by Venkat Subramaniam

https://www.youtube.com/watch?v=yTuwi--LFsM&t=6s

Optional

Iterators

It is now expected to use functional iterators.

These iterators should not be used with shared mutability. i.e., modifying a collection that is declared outside the pipeline

The example in the presentation showed how a switch between stream() and parallelStream() resulted in different behavior when one of the operators was modifying an external list.

Functional Purity

Pure functions have the following characteristics -

Lightweight Strategy

Functional Interfaces can be passed into methods to alter the business logic

In the following example, a method is called with a Predicate

callMethod(values, n -> n == someValue)

Factory Methods with default Interface methods

This was a bit confusing in regards to how we can consider a default method as a Factory method