|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sap.ip.me.api.services.BigDecimalFactory
Factory class to create BigDecimal
instances.
The MI framework can provide effective implementations of
BigDecimal
implementations to save memory
especially on memory limited devices. For that this factory
can be used to abstract from the actual limitation of BigDecimal.
It allows creating objects which are of type BigDecimal
or a sub class of it.
The actual implementation of BigDecimal can be changed via
configuration.
Each implementation class of this factory must provide an
empty public constructor.
To run your own version of BigDecimal and profit from the performance improvment
you need to do the following steps:
BigDecimal
as well as to
BigDecimal.valueOf(long)
and BigDecimal.valueOf(long, int)
by BigDecimalFactory.create(...)BigDecimal
(e.g MyBigDecimal).
You can put it in any package and give it any name. It is only necessary that your implementation extends
BigDecimal
BigDecimalFactory
and impelment all abstract create(...) methods by simply calling the constructor of MyBigDecimal. Your class MyBigDecimalFactory
must offer a public empty constructor.
Constructor Summary | |
BigDecimalFactory()
|
Method Summary | |
abstract java.math.BigDecimal |
create(java.math.BigInteger val)
Creates an instance of BigDecimal |
abstract java.math.BigDecimal |
create(java.math.BigInteger val,
int scale)
Creates an instance of BigDecimal |
abstract java.math.BigDecimal |
create(double val)
Creates an instance of BigDecimal |
abstract java.math.BigDecimal |
create(long val)
Creates an instance of BigDecimal |
abstract java.math.BigDecimal |
create(long val,
int scale)
Creates an instance of BigDecimal |
abstract java.math.BigDecimal |
create(java.lang.String val)
Creates an instance of BigDecimal |
static BigDecimalFactory |
getInstance()
Get an instance of BigDecimalFactory |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BigDecimalFactory()
Method Detail |
public static final BigDecimalFactory getInstance()
public abstract java.math.BigDecimal create(java.lang.String val)
BigDecimal
BigDecimal.BigDecimal(java.lang.String)
public abstract java.math.BigDecimal create(double val)
BigDecimal
BigDecimal.BigDecimal(double)
public abstract java.math.BigDecimal create(java.math.BigInteger val)
BigDecimal
BigDecimal.BigDecimal(java.math.BigInteger, int)
public abstract java.math.BigDecimal create(java.math.BigInteger val, int scale) throws java.lang.NumberFormatException
BigDecimal
java.lang.NumberFormatException
BigDecimal.BigDecimal(java.math.BigInteger, int)
public abstract java.math.BigDecimal create(long val, int scale) throws java.lang.NumberFormatException
BigDecimal
java.lang.NumberFormatException
BigDecimal.valueOf(long, int)
public abstract java.math.BigDecimal create(long val) throws java.lang.NumberFormatException
BigDecimal
java.lang.NumberFormatException
BigDecimal.valueOf(long, int)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |