Modifier and Type | Method and Description |
---|---|
static BigDecimal |
asBigDecimal(Number n) |
static BigInteger |
asBigInteger(Number n) |
static Number |
clampToRange(Class<?> type,
Number value,
Number min,
Number max) |
static Number |
getDefaultValue(Number min,
Number max,
Class<?> type) |
static Number |
getMaximumNumber(Class<?> type) |
static Number |
getMinimumNumber(Class<?> type) |
static Number |
toNumber(Object value,
Class<?> type)
Converts the given object to a
Number of the specified type, or
null if the types are incompatible. |
public static Number toNumber(Object value, Class<?> type)
Number
of the specified type, or
null if the types are incompatible.public static BigDecimal asBigDecimal(Number n)
public static BigInteger asBigInteger(Number n)
Copyright © 2015–2022 SciJava. All rights reserved.