public class PriceValue extends java.lang.Object implements java.io.Serializable, PDTValue
| Constructor and Description |
|---|
PriceValue(java.lang.String currencyIso,
double price,
boolean netto)
Creates a new price value.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object object) |
java.lang.String |
getCurrencyIso()
The currency iso code of this price.
|
PriceValue |
getOtherPrice(java.util.Collection taxValues)
converts this price into another price with opposing net/gross state.
|
PriceValue |
getOtherPrice(double relativeTotalTaxes)
converts this price into another price with opposing net/gross state.
|
PriceValue |
getOtherPrice(double relativeTotalTaxes,
double absoluteTotalTaxes)
converts this price into another price with opposing net/gross state.
|
double |
getValue()
The numeric value of this price.
|
int |
hashCode() |
boolean |
isNet()
Tells if this value includes taxes or not.
|
static PriceValue |
parsePriceValue(java.lang.String str) |
static java.util.Collection |
parsePriceValueCollection(java.lang.String str) |
java.lang.String |
toString() |
static java.lang.String |
toString(java.util.Collection prices) |
public PriceValue(java.lang.String currencyIso,
double price,
boolean netto)
price - the value of this pricenetto - determines if the value includes taxes or not ( true = netto = no taxes )currencyIso - the currency iso code for this pricepublic PriceValue getOtherPrice(double relativeTotalTaxes)
relativeTotalTaxes - the sum of all relative taxes e.g. 16% + 7% = 23%public PriceValue getOtherPrice(double relativeTotalTaxes, double absoluteTotalTaxes)
relativeTotalTaxes - the sum of all relative taxes e.g. 16% + 7% = 23%absoluteTotalTaxes - the sum of all absolute taxes - no currency conversion here !!!public PriceValue getOtherPrice(java.util.Collection taxValues)
taxValues - a collection of tax values which apply to this pricepublic java.lang.String toString()
toString in class java.lang.Objectpublic static final java.lang.String toString(java.util.Collection prices)
public static java.util.Collection parsePriceValueCollection(java.lang.String str)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic static PriceValue parsePriceValue(java.lang.String str) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic double getValue()
public boolean isNet()
public java.lang.String getCurrencyIso()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object object)
equals in class java.lang.ObjectCopyright © 2018 SAP SE. All Rights Reserved.