Having been using Java 8 now for 6+ months or so, I\'m pretty happy with the new API changes. One area I\'m still not confident in is when to use Optional
. I se
An Optional has similar semantics to an unmodifiable instance of the Iterator design pattern:
next()
method).Therefore consider returning or passing an Optional
in contexts where you might previously have considered using a Java Iterator.