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

Lack of Int-/Long-/Double-/BiPredicate.not()

XMLWordPrintable

    • generic
    • generic

      A DESCRIPTION OF THE PROBLEM :
      Predicate has a static method not that is useful in stream.filter(...) (as described in https://bugs.openjdk.java.net/browse/JDK-8203428) but there are no corresponding methods for the XxxPredicate classes.

      Off topic: I know big changes shouldn't be proposed here, but I've got a not entirely serious one anyway. What about allowing unary operators on predicates/functions like intStream.filter(!Character::isAlphabetic)? And alone like intStream.map(-)? Or even binary ones in some forms like intStream.map(*2), intStream.map(/2), intStream.map(1000/), intStream.filter(%10==7), intStream.filter(Util::odd&&Util::negative), intStream.filter(<5) and intStream.map(someIntUnaryOperator*2)?


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

              Created:
              Updated:
              Resolved: