src/share/classes/java/lang/Short.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1996, 2012, 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) 1996, 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
*** 401,413 ****
/**
* Returns a hash code for a {@code short} value; compatible with
* {@code Short.hashCode()}.
*
! * @since 1.8
! *
* @return a hash code value for a {@code short} value.
*/
public static int hashCode(short value) {
return (int)value;
}
--- 401,413 ----
/**
* Returns a hash code for a {@code short} value; compatible with
* {@code Short.hashCode()}.
*
! * @param value the value to hash
* @return a hash code value for a {@code short} value.
+ * @since 1.8
*/
public static int hashCode(short value) {
return (int)value;
}
*** 480,489 ****
--- 480,490 ----
/**
* Returns the value obtained by reversing the order of the bytes in the
* two's complement representation of the specified {@code short} value.
*
+ * @param i the value whose bytes are to be reversed
* @return the value obtained by reversing (or, equivalently, swapping)
* the bytes in the specified {@code short} value.
* @since 1.5
*/
public static short reverseBytes(short i) {