@Test public void testFilterNot() { Optional<Integer> result = Optional.of(10) .filterNot(Functions.remainder(2)); assertThat(result, isEmpty()); }
@NotNull public Optional<T> filterNot(@NotNull Predicate<? super T> predicate) { return filter(Predicate.Util.negate(predicate)); }
Optional { @NotNull public Optional<T> filterNot(@NotNull Predicate<? super T> predicate) { return filter(Predicate.Util.negate(predicate)); } }
Optional { @NotNull public Optional<T> filterNot(@NotNull Predicate<? super T> predicate) { return filter(Predicate.Util.negate(predicate)); } private  Optional(); private  Optional(T value); }
Optional { @NotNull public Optional<T> filterNot(@NotNull Predicate<? super T> predicate) { return filter(Predicate.Util.negate(predicate)); } private  Optional(); private  Optional(T value); @NotNull @Contract("_ -> new") static Optional<T> of(@NotNull T value); @NotNull static Optional<T> ofNullable(@Nullable T value); @NotNull @Contract(pure = true) @SuppressWarnings("unchecked") static Optional<T> empty(); @NotNull T get(); boolean isPresent(); boolean isEmpty(); void ifPresent(@NotNull Consumer<? super T> consumer); void ifPresentOrElse(@NotNull Consumer<? super T> consumer, @NotNull Runnable emptyAction); @NotNull Optional<T> executeIfPresent(@NotNull Consumer<? super T> consumer); @NotNull Optional<T> executeIfAbsent(@NotNull Runnable action); @Nullable R custom(@NotNull Function<Optional<T>, R> function); @NotNull Optional<T> filter(@NotNull Predicate<? super T> predicate); @NotNull Optional<T> filterNot(@NotNull Predicate<? super T> predicate); @NotNull Optional<U> map(@NotNull Function<? super T, ? extends U> mapper); @NotNull OptionalInt mapToInt(@NotNull ToIntFunction<? super T> mapper); @NotNull OptionalLong mapToLong(@NotNull ToLongFunction<? super T> mapper); @NotNull OptionalDouble mapToDouble(@NotNull ToDoubleFunction<? super T> mapper); @NotNull OptionalBoolean mapToBoolean(@NotNull ToBooleanFunction<? super T> mapper); @NotNull Optional<U> flatMap(@NotNull Function<? super T, Optional<U>> mapper); @NotNull @SuppressWarnings("unchecked") Stream<T> stream(); @NotNull @SuppressWarnings("unchecked") Optional<R> select(@NotNull Class<R> clazz); @NotNull Optional<T> or(@NotNull Supplier<Optional<T>> supplier); @Nullable T orElse(@Nullable T other); @Nullable T orElseGet(@NotNull Supplier<? extends T> other); @NotNull T orElseThrow(); @NotNull T orElseThrow(@NotNull Supplier<? extends X> exc); @Override boolean equals(Object obj); @Override int hashCode(); @NotNull @Override String toString(); }
Optional { @NotNull public Optional<T> filterNot(@NotNull Predicate<? super T> predicate) { return filter(Predicate.Util.negate(predicate)); } private  Optional(); private  Optional(T value); @NotNull @Contract("_ -> new") static Optional<T> of(@NotNull T value); @NotNull static Optional<T> ofNullable(@Nullable T value); @NotNull @Contract(pure = true) @SuppressWarnings("unchecked") static Optional<T> empty(); @NotNull T get(); boolean isPresent(); boolean isEmpty(); void ifPresent(@NotNull Consumer<? super T> consumer); void ifPresentOrElse(@NotNull Consumer<? super T> consumer, @NotNull Runnable emptyAction); @NotNull Optional<T> executeIfPresent(@NotNull Consumer<? super T> consumer); @NotNull Optional<T> executeIfAbsent(@NotNull Runnable action); @Nullable R custom(@NotNull Function<Optional<T>, R> function); @NotNull Optional<T> filter(@NotNull Predicate<? super T> predicate); @NotNull Optional<T> filterNot(@NotNull Predicate<? super T> predicate); @NotNull Optional<U> map(@NotNull Function<? super T, ? extends U> mapper); @NotNull OptionalInt mapToInt(@NotNull ToIntFunction<? super T> mapper); @NotNull OptionalLong mapToLong(@NotNull ToLongFunction<? super T> mapper); @NotNull OptionalDouble mapToDouble(@NotNull ToDoubleFunction<? super T> mapper); @NotNull OptionalBoolean mapToBoolean(@NotNull ToBooleanFunction<? super T> mapper); @NotNull Optional<U> flatMap(@NotNull Function<? super T, Optional<U>> mapper); @NotNull @SuppressWarnings("unchecked") Stream<T> stream(); @NotNull @SuppressWarnings("unchecked") Optional<R> select(@NotNull Class<R> clazz); @NotNull Optional<T> or(@NotNull Supplier<Optional<T>> supplier); @Nullable T orElse(@Nullable T other); @Nullable T orElseGet(@NotNull Supplier<? extends T> other); @NotNull T orElseThrow(); @NotNull T orElseThrow(@NotNull Supplier<? extends X> exc); @Override boolean equals(Object obj); @Override int hashCode(); @NotNull @Override String toString();  }