mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-08 17:38:38 +00:00
8067669: Documentation for methods in Number incomplete regarding too large values
Remove statments about rounding and truncation from the *Valud() methods Reviewed-by: rriggs, darcy, alundblad
This commit is contained in:
parent
edc9d85e7b
commit
c2fe1ca470
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1994, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1994, 2015, 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
|
||||
@ -37,7 +37,7 @@ package java.lang;
|
||||
*
|
||||
* For platform classes, the conversion is often analogous to a
|
||||
* narrowing primitive conversion or a widening primitive conversion
|
||||
* as defining in <cite>The Java™ Language Specification</cite>
|
||||
* as defined in <cite>The Java™ Language Specification</cite>
|
||||
* for converting between primitive types. Therefore, conversions may
|
||||
* lose information about the overall magnitude of a numeric value, may
|
||||
* lose precision, and may even return a result of a different sign
|
||||
@ -54,8 +54,7 @@ package java.lang;
|
||||
*/
|
||||
public abstract class Number implements java.io.Serializable {
|
||||
/**
|
||||
* Returns the value of the specified number as an {@code int},
|
||||
* which may involve rounding or truncation.
|
||||
* Returns the value of the specified number as an {@code int}.
|
||||
*
|
||||
* @return the numeric value represented by this object after conversion
|
||||
* to type {@code int}.
|
||||
@ -63,8 +62,7 @@ public abstract class Number implements java.io.Serializable {
|
||||
public abstract int intValue();
|
||||
|
||||
/**
|
||||
* Returns the value of the specified number as a {@code long},
|
||||
* which may involve rounding or truncation.
|
||||
* Returns the value of the specified number as a {@code long}.
|
||||
*
|
||||
* @return the numeric value represented by this object after conversion
|
||||
* to type {@code long}.
|
||||
@ -72,8 +70,7 @@ public abstract class Number implements java.io.Serializable {
|
||||
public abstract long longValue();
|
||||
|
||||
/**
|
||||
* Returns the value of the specified number as a {@code float},
|
||||
* which may involve rounding.
|
||||
* Returns the value of the specified number as a {@code float}.
|
||||
*
|
||||
* @return the numeric value represented by this object after conversion
|
||||
* to type {@code float}.
|
||||
@ -81,8 +78,7 @@ public abstract class Number implements java.io.Serializable {
|
||||
public abstract float floatValue();
|
||||
|
||||
/**
|
||||
* Returns the value of the specified number as a {@code double},
|
||||
* which may involve rounding.
|
||||
* Returns the value of the specified number as a {@code double}.
|
||||
*
|
||||
* @return the numeric value represented by this object after conversion
|
||||
* to type {@code double}.
|
||||
@ -90,8 +86,7 @@ public abstract class Number implements java.io.Serializable {
|
||||
public abstract double doubleValue();
|
||||
|
||||
/**
|
||||
* Returns the value of the specified number as a {@code byte},
|
||||
* which may involve rounding or truncation.
|
||||
* Returns the value of the specified number as a {@code byte}.
|
||||
*
|
||||
* <p>This implementation returns the result of {@link #intValue} cast
|
||||
* to a {@code byte}.
|
||||
@ -105,8 +100,7 @@ public abstract class Number implements java.io.Serializable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value of the specified number as a {@code short},
|
||||
* which may involve rounding or truncation.
|
||||
* Returns the value of the specified number as a {@code short}.
|
||||
*
|
||||
* <p>This implementation returns the result of {@link #intValue} cast
|
||||
* to a {@code short}.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user