public void ifPresent (Consumer<? super T> action)

If a value is present, performs the given action with the value, otherwise does nothing.

Parameters:
action    the action to be performed, if a value is present

Exceptions:
NullPointerException    if value is present and the given action is null