public class Range extends java.lang.Object implements XMLizable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
Constructor and Description |
---|
Range()
Constructor for Range.
|
Modifier and Type | Method and Description |
---|---|
void |
fromXML(org.w3c.dom.Node anXMLNode)
Transforms the XML node into its corresponding real Object.
|
java.math.BigDecimal |
getAmount()
This method gets the rewards in the Range.
|
java.lang.String |
getCurrency()
This method returns the currency.
|
java.math.BigDecimal |
getlowerBound()
This method gets the lowerBound of the range.
|
java.math.BigDecimal |
getUpperBound()
This method gets the upperBound of the range.
|
boolean |
isInRange(java.math.BigDecimal x)
This method checks if the given number falls in the Range.
|
boolean |
isLowerBoundIncludedInRange()
Returns a boolean value which indicates whether the lower bound is included in the range or not.
|
boolean |
isUpperBoundIncludedInRange()
Returns a boolean value which indicates whether the upper bound is included in the range or not.
|
void |
setAmount(java.math.BigDecimal _amount)
This method sets the rewards in the Range.
|
void |
setCurrency(java.lang.String string)
This method sets the currency, for example USD.
|
void |
setLowerBound(java.math.BigDecimal _lowerBound)
This method sets the lowerBound of the range.
|
void |
setLowerBoundIncludedInRange(boolean b)
Sets the boolean attribute lowerBoundIncludedInRange.
|
void |
setUpperBound(java.math.BigDecimal _upperBound)
This methods sets the upperBound of the range.
|
void |
setUpperBoundIncludedInRange(boolean b)
Sets the boolean attribute upperBoundIncludedInRange.
|
java.lang.String |
toXML()
Converts the object into its corresponding XML format representation.
|
public static final java.lang.String COPYRIGHT
public java.math.BigDecimal getlowerBound()
public java.math.BigDecimal getUpperBound()
public void setUpperBound(java.math.BigDecimal _upperBound)
_upperBound
- java.math.BigDecimal upperBound of the rangepublic void setLowerBound(java.math.BigDecimal _lowerBound)
_lowerBound
- java.math.BigDecimal lowerBound the rangepublic java.math.BigDecimal getAmount()
public void setAmount(java.math.BigDecimal _amount)
_amount
- the amount to be rewarded.public boolean isInRange(java.math.BigDecimal x)
x
- java.math.BigDecimaltrue
if number falls in the Range,
false
otherwise;public java.lang.String toXML() throws XMLizationException
XMLizable
toXML
in interface XMLizable
XMLizationException
- when this process failsXMLizable.toXML()
public void fromXML(org.w3c.dom.Node anXMLNode) throws DeXMLizationException
XMLizable
fromXML
in interface XMLizable
anXMLNode
- The node that represents an XMLizable objectDeXMLizationException
- when this process failsXMLizable.fromXML(Node)
public boolean isLowerBoundIncludedInRange()
true
indicates the lower bound is included in the range, which is the default value,
false
indicates the lower bound is not included in the range.public boolean isUpperBoundIncludedInRange()
true
indicates the upper bound is included in the range, which is the default value,
false
indicates the upper bound is not included in the range.public void setLowerBoundIncludedInRange(boolean b)
b
- new boolean value for the lowerBoundINcludedInRange attributepublic void setUpperBoundIncludedInRange(boolean b)
b
- new boolean value for the upperBoundINcludedInRange attributepublic java.lang.String getCurrency()
public void setCurrency(java.lang.String string)
string
- The currency.