public class FastNumber extends Number
Number
optimized for speed at the cost of memory.Modifier and Type | Method and Description |
---|---|
double |
doubleValue() |
boolean |
equals(Object o)
To be equal, two instances must both be instances of
FastNumber . |
float |
floatValue() |
int |
hashCode() |
int |
intValue() |
long |
longValue() |
static FastNumber |
orNull(Number number)
Safe-instantiator of FastNumber; returns a null result if the input Number is also null.
|
String |
toString() |
byteValue, shortValue
public static FastNumber orNull(Number number)
number
- public float floatValue()
floatValue
in class Number
public double doubleValue()
doubleValue
in class Number
public boolean equals(Object o)
FastNumber
. The inner number
field must also be a common type. Numbers which are mathematically equal are not
necessarily equal. This keeps with the java implementation of common Number classes where for
instance new Integer(0).equals(new Double(0))
returns false