Tomasz Nurkiewicz: Optional in Java 8 cheat sheet
java.util.Optional T in Java 8 is a poor cousin of scala.Option[T] and Data.Maybe in Haskell. But this doesn’t mean it’s not useful. If this concept is new to you, imagine Optional as a container that may or may not contain some value. Just like all references in Java can point to some object or be null, Option may enclose some (non-null!) reference or be empty. Turns out that the analogy between Optional and nullable references is quite sensible...