@Test public void testHashCode() { assertEquals(OptionalDouble.empty().hashCode(), 0); assertEquals(Double.valueOf(31d).hashCode(), OptionalDouble.of(31d).hashCode()); }
@Override public int hashCode() { return isPresent ? Objects.hashCode(value) : 0; }
OptionalDouble { @Override public int hashCode() { return isPresent ? Objects.hashCode(value) : 0; } }
OptionalDouble { @Override public int hashCode() { return isPresent ? Objects.hashCode(value) : 0; } private  OptionalDouble(); private  OptionalDouble(double value); }
OptionalDouble { @Override public int hashCode() { return isPresent ? Objects.hashCode(value) : 0; } 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 { @Override public int hashCode() { return isPresent ? Objects.hashCode(value) : 0; } 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();  }