Optional Consumer for ifNotPresent
Two things:


Your class only provides a if-else statement, really. If it would also provide all the features in the existing java.util.Optional, it would have been slightly more useful.
private Optional&lt;T&gt; optional; should definitely be marked with final


Okay then, three things:


Your factory method takes an existing Optional&lt;T&gt;, but you don't provide a getter or anything for the Optional&lt;T&gt;, which means that you could also provide an ordinary OptionalConsumer&lt;T&gt; ofNullable(T value)