@Test public void testToString() { assertEquals("OptionalBoolean.empty", OptionalBoolean.empty().toString()); assertEquals("OptionalBoolean[false]", OptionalBoolean.of(false).toString()); assertEquals("OptionalBoolean[true]", OptionalBoolean.of(true).toString()); }
@NotNull @Override public String toString() { return isPresent ? (value ? "OptionalBoolean[true]" : "OptionalBoolean[false]") : "OptionalBoolean.empty"; }
OptionalBoolean { @NotNull @Override public String toString() { return isPresent ? (value ? "OptionalBoolean[true]" : "OptionalBoolean[false]") : "OptionalBoolean.empty"; } }
OptionalBoolean { @NotNull @Override public String toString() { return isPresent ? (value ? "OptionalBoolean[true]" : "OptionalBoolean[false]") : "OptionalBoolean.empty"; } private  OptionalBoolean(); private  OptionalBoolean(boolean value); }
OptionalBoolean { @NotNull @Override public String toString() { return isPresent ? (value ? "OptionalBoolean[true]" : "OptionalBoolean[false]") : "OptionalBoolean.empty"; } private  OptionalBoolean(); private  OptionalBoolean(boolean value); @NotNull static OptionalBoolean empty(); @NotNull static OptionalBoolean of(boolean value); @NotNull static OptionalBoolean ofNullable(@Nullable Boolean value); boolean getAsBoolean(); boolean isPresent(); boolean isEmpty(); void ifPresent(@NotNull BooleanConsumer consumer); void ifPresentOrElse(@NotNull BooleanConsumer consumer, @NotNull Runnable emptyAction); @NotNull OptionalBoolean executeIfPresent(@NotNull BooleanConsumer consumer); @NotNull OptionalBoolean executeIfAbsent(@NotNull Runnable action); @Nullable R custom(@NotNull Function<OptionalBoolean, R> function); @NotNull OptionalBoolean filter(@NotNull BooleanPredicate predicate); @NotNull OptionalBoolean filterNot(@NotNull BooleanPredicate predicate); @NotNull OptionalBoolean map(@NotNull BooleanPredicate mapper); @NotNull Optional<U> mapToObj(@NotNull BooleanFunction<U> mapper); @NotNull OptionalBoolean or(@NotNull Supplier<OptionalBoolean> supplier); boolean orElse(boolean other); boolean orElseGet(@NotNull BooleanSupplier other); boolean orElseThrow(); boolean orElseThrow(@NotNull Supplier<X> exceptionSupplier); @Override boolean equals(Object obj); @Override int hashCode(); @NotNull @Override String toString(); }
OptionalBoolean { @NotNull @Override public String toString() { return isPresent ? (value ? "OptionalBoolean[true]" : "OptionalBoolean[false]") : "OptionalBoolean.empty"; } private  OptionalBoolean(); private  OptionalBoolean(boolean value); @NotNull static OptionalBoolean empty(); @NotNull static OptionalBoolean of(boolean value); @NotNull static OptionalBoolean ofNullable(@Nullable Boolean value); boolean getAsBoolean(); boolean isPresent(); boolean isEmpty(); void ifPresent(@NotNull BooleanConsumer consumer); void ifPresentOrElse(@NotNull BooleanConsumer consumer, @NotNull Runnable emptyAction); @NotNull OptionalBoolean executeIfPresent(@NotNull BooleanConsumer consumer); @NotNull OptionalBoolean executeIfAbsent(@NotNull Runnable action); @Nullable R custom(@NotNull Function<OptionalBoolean, R> function); @NotNull OptionalBoolean filter(@NotNull BooleanPredicate predicate); @NotNull OptionalBoolean filterNot(@NotNull BooleanPredicate predicate); @NotNull OptionalBoolean map(@NotNull BooleanPredicate mapper); @NotNull Optional<U> mapToObj(@NotNull BooleanFunction<U> mapper); @NotNull OptionalBoolean or(@NotNull Supplier<OptionalBoolean> supplier); boolean orElse(boolean other); boolean orElseGet(@NotNull BooleanSupplier other); boolean orElseThrow(); boolean orElseThrow(@NotNull Supplier<X> exceptionSupplier); @Override boolean equals(Object obj); @Override int hashCode(); @NotNull @Override String toString();  }