public class Price
extends java.lang.Object
Examples
Variant.getPrice
Constructor and Description |
---|
Price(Money value,
com.neovisionaries.i18n.CountryCode country,
Reference<CustomerGroup> customerGroup) |
Price(Money value,
com.neovisionaries.i18n.CountryCode country,
Reference<CustomerGroup> customerGroup,
com.google.common.base.Optional<DiscountedPrice> discounted) |
Modifier and Type | Method and Description |
---|---|
com.neovisionaries.i18n.CountryCode |
getCountry()
The optional country where this price applies, used in price calculations.
|
java.lang.String |
getCountryString()
The optional country where this price applies, used in price calculations.
|
Reference<CustomerGroup> |
getCustomerGroup()
The optional customer group for which this price applies, used in price calculations.
|
com.google.common.base.Optional<DiscountedPrice> |
getDiscounted() |
Money |
getValue()
The monetary value of the price.
|
boolean |
matches(java.lang.String currencyCode,
com.neovisionaries.i18n.CountryCode country,
Reference<CustomerGroup> customerGroup) |
java.lang.String |
toString() |
public Price(Money value, com.neovisionaries.i18n.CountryCode country, Reference<CustomerGroup> customerGroup, com.google.common.base.Optional<DiscountedPrice> discounted)
public Price(Money value, com.neovisionaries.i18n.CountryCode country, Reference<CustomerGroup> customerGroup)
public Money getValue()
public com.neovisionaries.i18n.CountryCode getCountry()
public java.lang.String getCountryString()
@Nonnull public Reference<CustomerGroup> getCustomerGroup()
public boolean matches(java.lang.String currencyCode, com.neovisionaries.i18n.CountryCode country, Reference<CustomerGroup> customerGroup)
public com.google.common.base.Optional<DiscountedPrice> getDiscounted()
public java.lang.String toString()
toString
in class java.lang.Object