--- old/src/share/classes/java/lang/Integer.java 2012-12-10 15:42:26.918997917 -0800 +++ new/src/share/classes/java/lang/Integer.java 2012-12-10 15:42:26.750997911 -0800 @@ -1512,6 +1512,45 @@ ((i << 24)); } + /** + * Adds two integers together as per the + operator. + * + * @param a the first operand + * @param b the second operand + * @return the sum of {@code a} and {@code b} + * @see java.util.function.BinaryOperator + * @since 1.8 + */ + public static int sum(int a, int b) { + return a + b; + } + + /** + * Returns the greater of two {@code int} values. + * + * @param a the first operand + * @param b the second operand + * @return the larger of {@code a} and {@code b} + * @see java.util.function.BinaryOperator + * @since 1.8 + */ + public static int max(int a, int b) { + return Math.max(a, b); + } + + /** + * Returns the lesser of two {@code int} values. + * + * @param a the first operand + * @param b the second operand + * @return the lesser of {@code a} and {@code b} + * @see java.util.function.BinaryOperator + * @since 1.8 + */ + public static int min(int a, int b) { + return Math.min(a, b); + } + /** use serialVersionUID from JDK 1.0.2 for interoperability */ private static final long serialVersionUID = 1360826667806852920L; }