org.scijava.util
Class NumberUtils
java.lang.Object
org.scijava.util.NumberUtils
public final class NumberUtils
- extends Object
Useful methods for working with Number
objects.
- Author:
- Curtis Rueden, Barry DeZonia
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
toNumber
public 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.
getMinimumNumber
public static Number getMinimumNumber(Class<?> type)
getMaximumNumber
public static Number getMaximumNumber(Class<?> type)
getDefaultValue
public static Number getDefaultValue(Number min,
Number max,
Class<?> type)
clampToRange
public static Number clampToRange(Class<?> type,
Number value,
Number min,
Number max)
Copyright © 2009–2014 SciJava. All rights reserved.