public class Price extends AbstractPrintTalk
| Modifier and Type | Field and Description |
|---|---|
static String |
ATTR_AMOUNT |
static String |
ATTR_LINEID |
static String |
ATTR_LINEIDREFS |
static String |
ATTR_PRICE |
static String |
ATTR_UNITPRICE |
static String |
ELEMENT_PRICE |
ATTR_JOBIDREF, log, theElement| Constructor and Description |
|---|
Price(org.cip4.jdflib.core.KElement theElement) |
| Modifier and Type | Method and Description |
|---|---|
Additional |
addAdditional(double amount,
double price)
add a price element
|
void |
addLineIDRef(String lineIDRef) |
Additional |
getAdditional(int i)
get a price element by LineID
|
double |
getAmount()
get amount
|
static int |
getCurrencyPrecision()
get the precision for currency
|
String |
getLineID() |
org.cip4.jdflib.core.VString |
getLineIDRefs()
get the list of LineIDRefs
|
Pricing |
getParentPricing()
get the parent Pricing
|
double |
getPrice()
get the price
|
double |
getUnitPrice()
get the price per unit
|
boolean |
isReferenced()
if true this price is referenced e.g.
|
void |
refPrice(Price subPrice)
add the LineID of subPrice to LineIDRefs of this, ignoring duplicates
|
void |
setAmount(double price)
set amount
|
static void |
setCurrencyPrecision(int currencyPrecision)
set the precision for currency
|
void |
setLineID(String lineID) |
void |
setLineIDRefs(org.cip4.jdflib.core.VString lineIDRefs) |
void |
setPrice(double price)
set the price
|
void |
setUnitPrice(double price)
set the price per unit
|
appendElement, equals, getAttribute, getAttribute, getCreateElement, getCreateXPathElement, getDescriptiveName, getElement, getElement, getElements, getPrintTalk, getRoot, getTElem, getXPathAttribute, getXPathElement, hashCode, init, setAttribute, setDescriptiveName, setRoot, setTElem, setXPathAttribute, setXPathValue, toStringpublic static String ELEMENT_PRICE
public static String ATTR_PRICE
public static String ATTR_UNITPRICE
public static String ATTR_AMOUNT
public static String ATTR_LINEID
public static String ATTR_LINEIDREFS
public Price(org.cip4.jdflib.core.KElement theElement)
theElement - public static int getCurrencyPrecision()
public static void setCurrencyPrecision(int currencyPrecision)
currencyPrecision - typically 0 or 2 , default=2public Pricing getParentPricing()
public void setPrice(double price)
price - public double getPrice()
public void setUnitPrice(double price)
price - public double getUnitPrice()
public void setAmount(double price)
price - public double getAmount()
public void setLineID(String lineID)
lineID - public boolean isReferenced()
public void setLineIDRefs(org.cip4.jdflib.core.VString lineIDRefs)
lineIDRefs - public void addLineIDRef(String lineIDRef)
lineIDRef - public void refPrice(Price subPrice)
subPrice - public org.cip4.jdflib.core.VString getLineIDRefs()
public String getLineID()
public Additional addAdditional(double amount, double price)
amount - price - public Additional getAdditional(int i)
i - indexCopyright © 2013. All Rights Reserved.