Package com.androidplot.util
Class FastNumber
-
- All Implemented Interfaces:
-
java.io.Serializable
public class FastNumber extends Number
An extension of Number optimized for speed at the cost of memory.
-
-
Method Summary
Modifier and Type Method Description static FastNumberorNull(@Nullable() Number number)Safe-instantiator of FastNumber; returns a null result if the input Number is also null. intintValue()longlongValue()floatfloatValue()doubledoubleValue()booleanequals(@Nullable() Object o)To be equal, two instances must both be instances of FastNumber. inthashCode()StringtoString()-
-
Method Detail
-
orNull
@Nullable() static FastNumber orNull(@Nullable() Number number)
Safe-instantiator of FastNumber; returns a null result if the input Number is also null.
-
intValue
int intValue()
-
longValue
long longValue()
-
floatValue
float floatValue()
-
doubleValue
double doubleValue()
-
equals
boolean equals(@Nullable() Object o)
To be equal, two instances must both be instances of 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))returnsfalse
-
hashCode
int hashCode()
-
-
-
-