guava/src/com/google/common/collect/Streams.java
@Beta
  public static <T> Stream<T> stream(com.google.common.base.Optional<T> optional) {
    return optional.isPresent() ? Stream.of(optional.get()) : Stream.of();
  }
@Beta
  public static <T> Stream<T> stream(com.google.common.base.Optional<T> optional) {
    return optional.isPresent() ? Stream.of(optional.get()) : Stream.of();
  }
@ Beta public static < T > Stream < T > stream ( com . google . common . base . Optional < T > optional ) { return optional . isPresent ( ) ? Stream . of ( optional . get ( ) ) : Stream . of ( ) ; }
If a value is present in {@code optional}, returns a stream containing only that element,
otherwise returns an empty stream.
If a value is present in {