public class FastNumber
extends java.lang.Number
Number optimized for speed at the cost of memory.| Modifier and Type | Method and Description |
|---|---|
double |
doubleValue() |
boolean |
equals(java.lang.Object o)
To be equal, two instances must both be instances of
FastNumber. |
float |
floatValue() |
int |
hashCode() |
int |
intValue() |
long |
longValue() |
static FastNumber |
orNull(java.lang.Number number)
Safe-instantiator of FastNumber; returns a null result if the input Number is also null.
|
java.lang.String |
toString() |
public static FastNumber orNull(java.lang.Number number)
number - public int intValue()
intValue in class java.lang.Numberpublic long longValue()
longValue in class java.lang.Numberpublic float floatValue()
floatValue in class java.lang.Numberpublic double doubleValue()
doubleValue in class java.lang.Numberpublic boolean equals(java.lang.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 falseequals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object