| |
|
| java.lang.Object java.lang.Number java.math.BigDecimal com.lutris.util.Currency
Currency | public class Currency extends BigDecimal (Code) | | Object to store and manipulate money.
|
Constructor Summary | |
public | Currency() Construct a Currency object of value zero. | public | Currency(BigDecimal value) Construct a Currency object from a BigDecimal or Currency object. | public | Currency(double value) Construct a Currency object from a double. | public | Currency(float value) Construct a Currency object from a float. | public | Currency(String value) Construct a Currency object from a String. |
Currency | public Currency()(Code) | | Construct a Currency object of value zero.
|
Currency | public Currency(BigDecimal value)(Code) | | Construct a Currency object from a BigDecimal or Currency object.
A null value result in an object containing zero.
|
Currency | public Currency(double value)(Code) | | Construct a Currency object from a double.
|
Currency | public Currency(float value)(Code) | | Construct a Currency object from a float.
|
Currency | public Currency(String value)(Code) | | Construct a Currency object from a String.
|
absCurrency | public Currency absCurrency()(Code) | | Returns a Currency whose value is the absolute value of this
number.
|
equals | public boolean equals(float value)(Code) | | Check if equal to a float value.
|
equals | public boolean equals(double value)(Code) | | Check if equal to a double value.
|
multiply | public Currency multiply(int val)(Code) | | Returns a Currency whose value is (this * val)
|
negateCurrency | public Currency negateCurrency()(Code) | | Returns a Currency whose value is -1 * this.
|
toString | public String toString()(Code) | | Convert to string with two decimals.
|
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)
|
|
|
|