transformNullable< S> method
Transforms the Optional value.
If the Optional is absent(), returns absent() without applying the transformer.
Returns absent() if the transformer returns null
.
Implementation
Optional<S> transformNullable<S>(S transformer(T value)) {
return _value == null
? new Optional.absent()
: new Optional.fromNullable(transformer(_value));
}