com.ibm.commerce.marketing.promotion.reward

Class DistributionRange

  • java.lang.Object
    • com.ibm.commerce.marketing.promotion.reward.DistributionRange
  • All Implemented Interfaces:
    XMLizable, java.io.Serializable


    public class DistributionRange
    extends java.lang.Object
    implements XMLizable
    DistributionRange class provides default implementation for Range. The class extends XMLizable interface. XML Snippet for a DistributionRange:
      <Range impl="com.ibm.commerce.marketing.promotion.reward.DistributionRange">
                    <LowerBound>0</LowerBound>
                    <UpperBound>2</UpperBound>
                    <RewardChoice>
                            <!-- Multiple Rewards can be specified  -->
                            <Reward></Reward>
                    </RewardChoice>
            </Range>
     
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM copyright notice field.
    • Constructor Summary

      Constructors 
      Constructor and Description
      DistributionRange()
      Constructor for DistributionRange.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      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 getlowerBound()
      This method gets the lower bound of the range.
      Reward[] getRewards()
      This method gets the rewards in the range.
      java.math.BigDecimal getUpperBound()
      This method gets the upper bound 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 setLowerBound(java.math.BigDecimal _lowerBound)
      This method sets the lower bound of the range.
      void setLowerBoundIncludedInRange(boolean b)
      Sets the boolean attribute lowerBoundIncludedInRange.
      void setRewards(Reward[] _rewards)
      This method sets the rewards in the range.
      void setUpperBound(java.math.BigDecimal _upperBound)
      This methods sets the upper bound 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.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
    • Constructor Detail

      • DistributionRange

        public DistributionRange()
        Constructor for DistributionRange.
    • Method Detail

      • getlowerBound

        public java.math.BigDecimal getlowerBound()
        This method gets the lower bound of the range.
        Returns:
        java.math.BigDecimal lower bound of the range
      • getUpperBound

        public java.math.BigDecimal getUpperBound()
        This method gets the upper bound of the range.
        Returns:
        java.math.BigDecimal upper bound of the range
      • setUpperBound

        public void setUpperBound(java.math.BigDecimal _upperBound)
        This methods sets the upper bound of the range.
        Parameters:
        _upperBound - java.math.BigDecimal upper bound of the range
      • setLowerBound

        public void setLowerBound(java.math.BigDecimal _lowerBound)
        This method sets the lower bound of the range.
        Parameters:
        _lowerBound - java.math.BigDecimal lower bound the range
      • getRewards

        public Reward[] getRewards()
        This method gets the rewards in the range.
        Returns:
        list of Reward
      • setRewards

        public void setRewards(Reward[] _rewards)
        This method sets the rewards in the range.
        Parameters:
        _rewards - list of Reward
      • isInRange

        public boolean isInRange(java.math.BigDecimal x)
        This method checks if the given number falls in the range.
        Parameters:
        x - java.math.BigDecimal
        Returns:
        boolean true if number falls in the range, false otherwise;
      • isLowerBoundIncludedInRange

        public boolean isLowerBoundIncludedInRange()
        Returns a boolean value which indicates whether the lower bound is included in the range or not. 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.
        Returns:
        a boolean value indicating whether the lower bound is included in the range or not.
      • isUpperBoundIncludedInRange

        public boolean isUpperBoundIncludedInRange()
        Returns a boolean value which indicates whether the upper bound is included in the range or not. 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.
        Returns:
        a boolean value indicating whether the upper bound is included in the range or not.
      • setLowerBoundIncludedInRange

        public void setLowerBoundIncludedInRange(boolean b)
        Sets the boolean attribute lowerBoundIncludedInRange. A true value indicates the lower bound is included in the range, a false indicates the lower bound is not included in the range.
        Parameters:
        b - new boolean value for the lowerBoundIncludedInRange attribute
      • setUpperBoundIncludedInRange

        public void setUpperBoundIncludedInRange(boolean b)
        Sets the boolean attribute upperBoundIncludedInRange. A true value indicates the upper bound is included in the range, a false indicates the upper bound is not included in the range.
        Parameters:
        b - new boolean value for the upperBoundIncludedInRange attribute