< prev index next >

src/java.base/share/classes/java/lang/Integer.java

Print this page

        

*** 1118,1137 **** } /** * Returns the value of this {@code Integer} as a {@code byte} * after a narrowing primitive conversion. ! * @jls 5.1.3 Narrowing Primitive Conversions */ public byte byteValue() { return (byte)value; } /** * Returns the value of this {@code Integer} as a {@code short} * after a narrowing primitive conversion. ! * @jls 5.1.3 Narrowing Primitive Conversions */ public short shortValue() { return (short)value; } --- 1118,1137 ---- } /** * Returns the value of this {@code Integer} as a {@code byte} * after a narrowing primitive conversion. ! * @jls 5.1.3 Narrowing Primitive Conversion */ public byte byteValue() { return (byte)value; } /** * Returns the value of this {@code Integer} as a {@code short} * after a narrowing primitive conversion. ! * @jls 5.1.3 Narrowing Primitive Conversion */ public short shortValue() { return (short)value; }
*** 1145,1174 **** } /** * Returns the value of this {@code Integer} as a {@code long} * after a widening primitive conversion. ! * @jls 5.1.2 Widening Primitive Conversions * @see Integer#toUnsignedLong(int) */ public long longValue() { return (long)value; } /** * Returns the value of this {@code Integer} as a {@code float} * after a widening primitive conversion. ! * @jls 5.1.2 Widening Primitive Conversions */ public float floatValue() { return (float)value; } /** * Returns the value of this {@code Integer} as a {@code double} * after a widening primitive conversion. ! * @jls 5.1.2 Widening Primitive Conversions */ public double doubleValue() { return (double)value; } --- 1145,1174 ---- } /** * Returns the value of this {@code Integer} as a {@code long} * after a widening primitive conversion. ! * @jls 5.1.2 Widening Primitive Conversion * @see Integer#toUnsignedLong(int) */ public long longValue() { return (long)value; } /** * Returns the value of this {@code Integer} as a {@code float} * after a widening primitive conversion. ! * @jls 5.1.2 Widening Primitive Conversion */ public float floatValue() { return (float)value; } /** * Returns the value of this {@code Integer} as a {@code double} * after a widening primitive conversion. ! * @jls 5.1.2 Widening Primitive Conversion */ public double doubleValue() { return (double)value; }
< prev index next >