public class Price
extends java.lang.Object
![]() |
![]() |
An ID3v2.x price consists of a currency and an amount.
| Field | Description | |
|---|---|---|
| 1. | Currency | currency of the price. |
| 2. | amount | The amount uses the "." character as the decimal point. |
Some examples of a price are:
| Constructor and Description |
|---|
Price()
default constructor using default values of USD and 0.00 for the currency and amount, respectively.
|
Price(Currency currency,
java.lang.String amount)
constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getAmount()
get the amount of the price.
|
Currency |
getCurrency()
get the currency of the price.
|
void |
setAmount(java.lang.String amount)
set the amount of the price.
|
void |
setCurrency(Currency currency)
sets the currency of the price.
|
java.lang.String |
toString()
get a string representation of a price.
|
public Price()
public Price(Currency currency, java.lang.String amount) throws java.lang.IllegalArgumentException
currency - the ISO-4217 currency code.amount - the amount of the price using "." as the decimal point.java.lang.IllegalArgumentException - if the amount is not a valid amount. That is, if the amount is not in the form "^\d+\.?\d*$"setAmount(String)public Currency getCurrency()
ISO-4217 currency code.setCurrency(Currency)public void setCurrency(Currency currency)
currency - the ISO-4217 currency.getCurrency()public java.lang.String getAmount()
setAmount(String)public void setAmount(java.lang.String amount)
amount - the amount of the price using "." as the decimal point.java.lang.IllegalArgumentException - if the amount is not a valid amount. That is, if the amount is not in the form "^\d+\.?\d*$"getAmount()public java.lang.String toString()
toString in class java.lang.Object