public Optional < T > ifPresent ( final Consumer < ? super T > consumer ) { if ( isPresent ( ) ) { consumer . accept ( get ( ) ) ; } return this ; }
If a value is present invoke the specified consumer with the value otherwise do nothing .