| java.lang.Object java.lang.Number java.math.BigDecimal com.knowgate.math.Money
Money | public class Money extends BigDecimal (Code) | | Combination of BigDecimal with Currency Sign
This class handles money amounts that include a currency sign
author: Sergio Montoro Ten version: 1.0 |
Money | public Money(double dVal, CurrencyCode oCur)(Code) | | Constructor
Parameters: dVal - double Parameters: oCur - CurrencyCode |
convertTo | public Money convertTo(CurrencyCode oTarget, BigDecimal oRatio) throws NullPointerException(Code) | | Convert this money to another currency
Parameters: oTarget - Target CurrencyCode Parameters: oRatio - BigDecimal Conversion ratio Money if this CurrencyCode is the same as oTargetthen this is returned without any modification,if if this CurrencyCode is different from oTargetthen the returned value is this multiplied by oRatio. throws: NullPointerException - if oTarget is null |
format | public String format(String sLanguage, String sCountry)(Code) | | Format a BigDecimal as a String following the rules for an specific language and country
Parameters: sLanguage - String ISO-639 two letter language code Parameters: sCountry - String ISO-3166 two leter country code String |
round2 | public Money round2()(Code) | | Rounds a BigDecimal value to two decimals
BigDecimal |
Methods inherited from java.math.BigDecimal | public BigDecimal abs()(Code)(Java Doc) public BigDecimal abs(MathContext mc)(Code)(Java Doc) public BigDecimal add(BigDecimal augend)(Code)(Java Doc) public BigDecimal add(BigDecimal augend, MathContext mc)(Code)(Java Doc) public byte byteValueExact()(Code)(Java Doc) public int compareTo(BigDecimal val)(Code)(Java Doc) public BigDecimal divide(BigDecimal divisor, int scale, int roundingMode)(Code)(Java Doc) public BigDecimal divide(BigDecimal divisor, int scale, RoundingMode roundingMode)(Code)(Java Doc) public BigDecimal divide(BigDecimal divisor, int roundingMode)(Code)(Java Doc) public BigDecimal divide(BigDecimal divisor, RoundingMode roundingMode)(Code)(Java Doc) public BigDecimal divide(BigDecimal divisor)(Code)(Java Doc) public BigDecimal divide(BigDecimal divisor, MathContext mc)(Code)(Java Doc) public BigDecimal[] divideAndRemainder(BigDecimal divisor)(Code)(Java Doc) public BigDecimal[] divideAndRemainder(BigDecimal divisor, MathContext mc)(Code)(Java Doc) public BigDecimal divideToIntegralValue(BigDecimal divisor)(Code)(Java Doc) public BigDecimal divideToIntegralValue(BigDecimal divisor, MathContext mc)(Code)(Java Doc) public double doubleValue()(Code)(Java Doc) public boolean equals(Object x)(Code)(Java Doc) public float floatValue()(Code)(Java Doc) public int hashCode()(Code)(Java Doc) public int intValue()(Code)(Java Doc) public int intValueExact()(Code)(Java Doc) public long longValue()(Code)(Java Doc) public long longValueExact()(Code)(Java Doc) public BigDecimal max(BigDecimal val)(Code)(Java Doc) public BigDecimal min(BigDecimal val)(Code)(Java Doc) public BigDecimal movePointLeft(int n)(Code)(Java Doc) public BigDecimal movePointRight(int n)(Code)(Java Doc) public BigDecimal multiply(BigDecimal multiplicand)(Code)(Java Doc) public BigDecimal multiply(BigDecimal multiplicand, MathContext mc)(Code)(Java Doc) public BigDecimal negate()(Code)(Java Doc) public BigDecimal negate(MathContext mc)(Code)(Java Doc) public BigDecimal plus()(Code)(Java Doc) public BigDecimal plus(MathContext mc)(Code)(Java Doc) public BigDecimal pow(int n)(Code)(Java Doc) public BigDecimal pow(int n, MathContext mc)(Code)(Java Doc) public int precision()(Code)(Java Doc) public BigDecimal remainder(BigDecimal divisor)(Code)(Java Doc) public BigDecimal remainder(BigDecimal divisor, MathContext mc)(Code)(Java Doc) public BigDecimal round(MathContext mc)(Code)(Java Doc) public int scale()(Code)(Java Doc) public BigDecimal scaleByPowerOfTen(int n)(Code)(Java Doc) public BigDecimal setScale(int newScale, RoundingMode roundingMode)(Code)(Java Doc) public BigDecimal setScale(int newScale, int roundingMode)(Code)(Java Doc) public BigDecimal setScale(int newScale)(Code)(Java Doc) public short shortValueExact()(Code)(Java Doc) public int signum()(Code)(Java Doc) public BigDecimal stripTrailingZeros()(Code)(Java Doc) public BigDecimal subtract(BigDecimal subtrahend)(Code)(Java Doc) public BigDecimal subtract(BigDecimal subtrahend, MathContext mc)(Code)(Java Doc) public BigInteger toBigInteger()(Code)(Java Doc) public BigInteger toBigIntegerExact()(Code)(Java Doc) public String toEngineeringString()(Code)(Java Doc) public String toPlainString()(Code)(Java Doc) public String toString()(Code)(Java Doc) public BigDecimal ulp()(Code)(Java Doc) public BigInteger unscaledValue()(Code)(Java Doc) public static BigDecimal valueOf(long unscaledVal, int scale)(Code)(Java Doc) public static BigDecimal valueOf(long val)(Code)(Java Doc) public static BigDecimal valueOf(double val)(Code)(Java Doc)
|
|
|