package de.retest.recheck.util;

import java.util.Optional;
import java.util.stream.Stream;

public class OptionalUtil {

	private OptionalUtil() {}

	public static <T> Stream<T> stream( final Optional<T> o ) {
		return o.map( Stream::of ).orElseGet( Stream::empty );
	}

}

@@ -53,16 +53,52 @@
 tional;%0A
+import java.util.function.Supplier;%0A
 import j
@@ -301,10 +301,143 @@
  );%0A%09%7D%0A%0A
+%09public static %3CT%3E Optional%3CT%3E or%E2%80%8B( final Optional%3CT%3E o, final Supplier%3COptional%3CT%3E%3E s ) %7B%0A%09%09return o.isPresent() ? o : s.get();%0A%09%7D%0A%0A
 %7D%0A

Add helpfer for or