Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8253396

Please add `not()` method to `java.util.function.BiPredicate`

XMLWordPrintable

    • generic
    • generic

      ADDITIONAL SYSTEM INFORMATION :
      MACOS / OS X / java11

      A DESCRIPTION OF THE PROBLEM :
      `java.util.function.Predicate` has method `static <T> Predicate<T> not(Predicate<? super T> target)`. And `BiPredicate` does not. Is there any critical reason for this? Because now it's impossible to write code like
      `BiPredicate<Set<String>, String> setContains = BiPredicate.not(Set::contains)`. I need intermediate variable to call `setContains.negate()`


            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: