Serializable
AtomicInteger
, AtomicLong
, BigDecimal
, BigInteger
, Byte
, Double
, DoubleAccumulator
, DoubleAdder
, Float
, Integer
, Long
, LongAccumulator
, LongAdder
, Short
The abstract class Number
is the superclass of platform classes representing numeric values that are convertible to the primitive types byte
, double
, float
, int
, long
, and short
. The specific semantics of the conversion from the numeric value of a particular Number
implementation to a given primitive type is defined by the Number
implementation in question. For platform classes, the conversion is often analogous to a narrowing primitive conversion or a widening primitive conversion as defined in The Java Language Specification 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 than the input. See the documentation of a given Number
implementation for conversion details.
Constructors
Constructor for subclasses to call.
byte
Returns the value of the specified number as a byte
.
abstract double
Returns the value of the specified number as a double
.
abstract float
Returns the value of the specified number as a float
.
abstract int
Returns the value of the specified number as an int
.
abstract long
Returns the value of the specified number as a long
.
short
Returns the value of the specified number as a short
.
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public Number()
Constructor for subclasses to call.
public abstract int intValue()
Returns the value of the specified number as an int
.
int
.
public abstract long longValue()
Returns the value of the specified number as a long
.
long
.
public abstract float floatValue()
Returns the value of the specified number as a float
.
float
.
public abstract double doubleValue()
Returns the value of the specified number as a double
.
double
.
public byte byteValue()
Returns the value of the specified number as a byte
.
intValue()
cast to a byte
.
byte
.
public short shortValue()
Returns the value of the specified number as a short
.
intValue()
cast to a short
.
short
.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4