--- old/src/share/classes/java/util/function/IntPredicate.java 2013-05-06 18:47:05.419524413 -0700 +++ new/src/share/classes/java/util/function/IntPredicate.java 2013-05-06 18:47:05.219524402 -0700 @@ -39,11 +39,11 @@ /** * Returns {@code true} if the input value matches some criteria. * - * @param value the value to be tested. + * @param value the value to be tested * @return {@code true} if the input value matches some criteria, otherwise * {@code false} */ - public boolean test(int value); + boolean test(int value); /** * Returns a predicate which evaluates to {@code true} only if this @@ -51,11 +51,12 @@ * this predicate returns {@code false} then the remaining predicate is not * evaluated. * - * @param p a predicate which will be logically-ANDed with this predicate. + * @param p a predicate which will be logically-ANDed with this predicate * @return a new predicate which returns {@code true} only if both - * predicates return {@code true}. + * predicates return {@code true} + * @throws NullPointerException if p is null */ - public default IntPredicate and(IntPredicate p) { + default IntPredicate and(IntPredicate p) { Objects.requireNonNull(p); return (value) -> test(value) && p.test(value); } @@ -64,9 +65,9 @@ * Returns a predicate which negates the result of this predicate. * * @return a new predicate who's result is always the opposite of this - * predicate. + * predicate */ - public default IntPredicate negate() { + default IntPredicate negate() { return (value) -> !test(value); } @@ -76,25 +77,13 @@ * predicate returns {@code true} then the remaining predicate is not * evaluated. * - * @param p a predicate which will be logically-ORed with this predicate. + * @param p a predicate which will be logically-ORed with this predicate * @return a new predicate which returns {@code true} if either predicate - * returns {@code true}. + * returns {@code true} + * @throws NullPointerException if p is null */ - public default IntPredicate or(IntPredicate p) { + default IntPredicate or(IntPredicate p) { Objects.requireNonNull(p); return (value) -> test(value) || p.test(value); } - - /** - * Returns a predicate that evaluates to {@code true} if both or neither of - * the component predicates evaluate to {@code true}. - * - * @param p a predicate which will be logically-XORed with this predicate. - * @return a predicate that evaluates to {@code true} if both or neither of - * the component predicates evaluate to {@code true} - */ - public default IntPredicate xor(IntPredicate p) { - Objects.requireNonNull(p); - return (value) -> test(value) ^ p.test(value); - } }