@Test public void testStream() { long count = OptionalDouble.of(10d).stream().count(); assertThat(count, is(1L)); }
@NotNull public DoubleStream stream() { if (!isPresent()) { return DoubleStream.empty(); } return DoubleStream.of(value); }
OptionalDouble { @NotNull public DoubleStream stream() { if (!isPresent()) { return DoubleStream.empty(); } return DoubleStream.of(value); } }
OptionalDouble { @NotNull public DoubleStream stream() { if (!isPresent()) { return DoubleStream.empty(); } return DoubleStream.of(value); } private  OptionalDouble(); private  OptionalDouble(double value); }
OptionalDouble { @NotNull public DoubleStream stream() { if (!isPresent()) { return DoubleStream.empty(); } return DoubleStream.of(value); } private  OptionalDouble(); private  OptionalDouble(double value); @NotNull static OptionalDouble empty(); @NotNull static OptionalDouble of(double value); @NotNull static OptionalDouble ofNullable(@Nullable Double value); double getAsDouble(); boolean isPresent(); boolean isEmpty(); void ifPresent(@NotNull DoubleConsumer consumer); void ifPresentOrElse(@NotNull DoubleConsumer consumer, @NotNull Runnable emptyAction); @NotNull OptionalDouble executeIfPresent(@NotNull DoubleConsumer consumer); @NotNull OptionalDouble executeIfAbsent(@NotNull Runnable action); @Nullable R custom(@NotNull Function<OptionalDouble, R> function); @NotNull OptionalDouble filter(@NotNull DoublePredicate predicate); @NotNull OptionalDouble filterNot(@NotNull DoublePredicate predicate); @NotNull OptionalDouble map(@NotNull DoubleUnaryOperator mapper); @NotNull Optional<U> mapToObj(@NotNull DoubleFunction<U> mapper); @NotNull OptionalInt mapToInt(@NotNull DoubleToIntFunction mapper); @NotNull OptionalLong mapToLong(@NotNull DoubleToLongFunction mapper); @NotNull DoubleStream stream(); @NotNull OptionalDouble or(@NotNull Supplier<OptionalDouble> supplier); double orElse(double other); double orElseGet(@NotNull DoubleSupplier other); double orElseThrow(); double orElseThrow(@NotNull Supplier<X> exceptionSupplier); @Override boolean equals(Object obj); @Override int hashCode(); @NotNull @Override String toString(); }
OptionalDouble { @NotNull public DoubleStream stream() { if (!isPresent()) { return DoubleStream.empty(); } return DoubleStream.of(value); } private  OptionalDouble(); private  OptionalDouble(double value); @NotNull static OptionalDouble empty(); @NotNull static OptionalDouble of(double value); @NotNull static OptionalDouble ofNullable(@Nullable Double value); double getAsDouble(); boolean isPresent(); boolean isEmpty(); void ifPresent(@NotNull DoubleConsumer consumer); void ifPresentOrElse(@NotNull DoubleConsumer consumer, @NotNull Runnable emptyAction); @NotNull OptionalDouble executeIfPresent(@NotNull DoubleConsumer consumer); @NotNull OptionalDouble executeIfAbsent(@NotNull Runnable action); @Nullable R custom(@NotNull Function<OptionalDouble, R> function); @NotNull OptionalDouble filter(@NotNull DoublePredicate predicate); @NotNull OptionalDouble filterNot(@NotNull DoublePredicate predicate); @NotNull OptionalDouble map(@NotNull DoubleUnaryOperator mapper); @NotNull Optional<U> mapToObj(@NotNull DoubleFunction<U> mapper); @NotNull OptionalInt mapToInt(@NotNull DoubleToIntFunction mapper); @NotNull OptionalLong mapToLong(@NotNull DoubleToLongFunction mapper); @NotNull DoubleStream stream(); @NotNull OptionalDouble or(@NotNull Supplier<OptionalDouble> supplier); double orElse(double other); double orElseGet(@NotNull DoubleSupplier other); double orElseThrow(); double orElseThrow(@NotNull Supplier<X> exceptionSupplier); @Override boolean equals(Object obj); @Override int hashCode(); @NotNull @Override String toString();  }