transformNullable<S extends Object> 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 extends Object>(S? transformer(T value)) {
return _value == null
? Optional<S>.absent()
: Optional<S>.fromNullable(transformer(_value!));
}