@Test void ofEmpty() { Stream<Object> result = StreamUtil.of(Optional.empty()); assertThat(result.count(), is(0L)); }
public static <T> Stream<T> of(Optional<T> opt) { return opt.map(Stream::of).orElseGet(Stream::empty); }
StreamUtil extends UtilityClass { public static <T> Stream<T> of(Optional<T> opt) { return opt.map(Stream::of).orElseGet(Stream::empty); } }
StreamUtil extends UtilityClass { public static <T> Stream<T> of(Optional<T> opt) { return opt.map(Stream::of).orElseGet(Stream::empty); }  }
StreamUtil extends UtilityClass { public static <T> Stream<T> of(Optional<T> opt) { return opt.map(Stream::of).orElseGet(Stream::empty); }  static Stream<T> ofNullable(T value); static Stream<T> ofBlankable(T value); static Stream<T> of(Optional<T> opt); static Stream<Tuple2<T, Long>> zipWithIndex(Stream<? extends T> stream); static Stream<R> mapWithIndex(Stream<T> input, BiFunction<? super T, Long, ? extends R> mapping); static byte[] toByteArray(IntStream stream); }
StreamUtil extends UtilityClass { public static <T> Stream<T> of(Optional<T> opt) { return opt.map(Stream::of).orElseGet(Stream::empty); }  static Stream<T> ofNullable(T value); static Stream<T> ofBlankable(T value); static Stream<T> of(Optional<T> opt); static Stream<Tuple2<T, Long>> zipWithIndex(Stream<? extends T> stream); static Stream<R> mapWithIndex(Stream<T> input, BiFunction<? super T, Long, ? extends R> mapping); static byte[] toByteArray(IntStream stream);  }