java optional filter example
Example 1: instantiate optinal java 8
Person p = new Person();
Optional<Person> op = Optional.of(p);
Example 2: java 8 stream option
things.stream()
.map(this::resolve)
.filter(Optional::isPresent)
.map(Optional::get)
.findFirst();