public void ifPresentOrElse(Consumer<? super T> action,Runnable emptyAction){
  if (value != null) {
    action.accept(value);
  }
 else {
    emptyAction.run();
  }
}

public void ifPresentOrElse ( Consumer < ? super T > action , Runnable emptyAction ) { if ( value != null ) { action . accept ( value ) ; } else { emptyAction . run ( ) ; } }
if a value is present , performs the given action with the value , otherwise performs the given empty - based action .
