|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.avis.util.Numbers
public final class Numbers
General utility functions for messing with numbers.
| Method Summary | |
|---|---|
static Class<? extends Number> |
highestPrecision(Class<? extends Number> class1,
Class<? extends Number> class2)
Return the highest precision (class with the largest range) of two classes. |
static Number |
upconvert(Number value,
Class<? extends Number> type)
Convert a numeric value upwards to a given type. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Number upconvert(Number value,
Class<? extends Number> type)
value - A numeric value.type - The target type: either Long or Double.
IllegalArgumentException - if type is not valid.
public static Class<? extends Number> highestPrecision(Class<? extends Number> class1,
Class<? extends Number> class2)
IllegalArgumentException - if class1 or class2 is not a number.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||