Package com.github.twitch4j.common.util
Class DonationAmount
java.lang.Object
com.github.twitch4j.common.util.DonationAmount
-
Constructor Summary
ConstructorsConstructorDescriptionDonationAmount(Long value, Integer decimalPlaces, String currency) Creates a newDonationAmountinstance. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanThe ISO-4217 three-letter currency code that identifies the type of currency ingetValue().The number of decimal places used by the currency.TheCurrencycorresponding to the ISO-4217 code contained ingetCurrency().The donation amount, with the appropriate decimals, based ongetValue().getValue()The monetary amount.inthashCode()toString()
-
Constructor Details
-
DonationAmount
public DonationAmount() -
DonationAmount
Creates a newDonationAmountinstance.- Parameters:
value- The monetary amount.The amount is specified in the currency’s minor unit.
For example, the minor units for USD is cents, so if the amount is $5.50 USD, value is set to 550.
decimalPlaces- The number of decimal places used by the currency.For example, USD uses two decimal places.
currency- The ISO-4217 three-letter currency code that identifies the type of currency ingetValue().
-
-
Method Details
-
getValue
The monetary amount.The amount is specified in the currency’s minor unit.
For example, the minor units for USD is cents, so if the amount is $5.50 USD, value is set to 550.
-
getDecimalPlaces
The number of decimal places used by the currency.For example, USD uses two decimal places.
-
getCurrency
The ISO-4217 three-letter currency code that identifies the type of currency ingetValue(). -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-
getParsedCurrency
TheCurrencycorresponding to the ISO-4217 code contained ingetCurrency(). -
getParsedValue
The donation amount, with the appropriate decimals, based ongetValue().
-