--- old/src/share/classes/java/lang/Boolean.java 2012-12-10 15:42:25.022997844 -0800 +++ new/src/share/classes/java/lang/Boolean.java 2012-12-10 15:42:24.854997837 -0800 @@ -290,4 +290,46 @@ public static int compare(boolean x, boolean y) { return (x == y) ? 0 : (x ? 1 : -1); } + + /** + * Returns the result of applying the logical AND operator to the + * specified {@code boolean} operands. + * + * @param a the first operand + * @param b the second operand + * @return the logical AND of {@code a} and {@code b} + * @see java.util.function.BinaryOperator + * @since 1.8 + */ + public static boolean logicalAnd(boolean a, boolean b) { + return a && b; + } + + /** + * Returns the result of applying the logical OR operator to the + * specified {@code boolean} operands. + * + * @param a the first operand + * @param b the second operand + * @return the logical OR of {@code a} and {@code b} + * @see java.util.function.BinaryOperator + * @since 1.8 + */ + public static boolean logicalOr(boolean a, boolean b) { + return a || b; + } + + /** + * Returns the result of applying the logical XOR operator to the + * specified {@code boolean} operands. + * + * @param a the first operand + * @param b the second operand + * @return the logical XOR of {@code a} and {@code b} + * @see java.util.function.BinaryOperator + * @since 1.8 + */ + public static boolean logicalXor(boolean a, boolean b) { + return a ^ b; + } }