com.sap.ip.me.api.services
Class BigDecimalFactory

java.lang.Object
  extended bycom.sap.ip.me.api.services.BigDecimalFactory

public abstract class BigDecimalFactory
extends java.lang.Object

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:

Author:
SAP AG

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

BigDecimalFactory

public BigDecimalFactory()
Method Detail

getInstance

public static final BigDecimalFactory getInstance()
Get an instance of BigDecimalFactory

Returns:
an instance of BigDecimalFactory

create

public abstract java.math.BigDecimal create(java.lang.String val)
Creates an instance of BigDecimal

See Also:
BigDecimal.BigDecimal(java.lang.String)

create

public abstract java.math.BigDecimal create(double val)
Creates an instance of BigDecimal

See Also:
BigDecimal.BigDecimal(double)

create

public abstract java.math.BigDecimal create(java.math.BigInteger val)
Creates an instance of BigDecimal

See Also:
BigDecimal.BigDecimal(java.math.BigInteger, int)

create

public abstract java.math.BigDecimal create(java.math.BigInteger val,
                                            int scale)
                                     throws java.lang.NumberFormatException
Creates an instance of BigDecimal

Throws:
java.lang.NumberFormatException
See Also:
BigDecimal.BigDecimal(java.math.BigInteger, int)

create

public abstract java.math.BigDecimal create(long val,
                                            int scale)
                                     throws java.lang.NumberFormatException
Creates an instance of BigDecimal

Throws:
java.lang.NumberFormatException
See Also:
BigDecimal.valueOf(long, int)

create

public abstract java.math.BigDecimal create(long val)
                                     throws java.lang.NumberFormatException
Creates an instance of BigDecimal

Throws:
java.lang.NumberFormatException
See Also:
BigDecimal.valueOf(long, int)


Copyright © 2005 SAP AG. All Rights Reserved.