public final static <T>Stream<T> optionalToStream(final Optional<T> optional){
  if (optional.isPresent())   return Stream.of(optional.get());
  return Stream.of();
}

public final static < T > Stream < T > optionalToStream ( final Optional < T > optional ) { if ( optional . isPresent ( ) ) return Stream . of ( optional . get ( ) ) ; return Stream . of ( ) ; }
convert a stream to an optional
