public class MathUtilImpl extends MathUtilLimitedImpl implements MathUtil
Modifier and Type | Field and Description |
---|---|
static NumberTypeImpl<AtomicInteger> |
ATOMIC_INTEGER
The
NumberTypeImpl for AtomicInteger . |
static NumberTypeImpl<AtomicLong> |
ATOMIC_LONG
The
NumberTypeImpl for AtomicLong . |
private static MathUtil |
instance |
Constructor and Description |
---|
MathUtilImpl()
The constructor.
|
Modifier and Type | Method and Description |
---|---|
static MathUtil |
getInstance()
This method gets the singleton instance of
MathUtil . |
NumberType<? extends Number> |
getNumberType(Class<?> numericType)
This method gets the
NumberType for the given numericType . |
getNumberTypeGeneric, toSimplestNumber
createLogger, doInitialize, getLogger
doInitialized, getInitializationState, initialize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getNumberTypeGeneric, toSimplestNumber
public static final NumberTypeImpl<AtomicLong> ATOMIC_LONG
NumberTypeImpl
for AtomicLong
.public static final NumberTypeImpl<AtomicInteger> ATOMIC_INTEGER
NumberTypeImpl
for AtomicInteger
.private static MathUtil instance
public static MathUtil getInstance()
MathUtil
. Cdi.GET_INSTANCE
before using.public NumberType<? extends Number> getNumberType(Class<?> numericType)
MathUtilLimited
NumberType
for the given numericType
.getNumberType
in interface MathUtilLimited
getNumberType
in class MathUtilLimitedImpl
numericType
- is the class reflecting a Number
. It may be primitive
(such
as int.class
). The signature is NOT bound to Number
to make it easy for the caller (e.g.
Number.class.isAssignableFrom(int.class)
is false
).NumberType
representing the given numericType
or null
if the given
numericType
is no Number
or is NOT known (you may extend this MathUtilLimited
in
such case).MathUtilLimited.getNumberTypeGeneric(Class)
Copyright © 2001–2016 mmm-Team. All rights reserved.