src/share/classes/java/lang/Boolean.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1994, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 203,215 **** /** * Returns a hash code for a {@code boolean} value; compatible with * {@code Boolean.hashCode()}. * ! * @since 1.8 ! * * @return a hash code value for a {@code boolean} value. */ public static int hashCode(boolean value) { return value ? 1231 : 1237; } --- 203,215 ---- /** * Returns a hash code for a {@code boolean} value; compatible with * {@code Boolean.hashCode()}. * ! * @param value the value to hash * @return a hash code value for a {@code boolean} value. + * @since 1.8 */ public static int hashCode(boolean value) { return value ? 1231 : 1237; }