atg.commerce.pricing.definition
Class MatchingObject

java.lang.Object
  extended by atg.commerce.pricing.definition.MatchingObject

public class MatchingObject
extends java.lang.Object

An element of a collection that matched, the quantity that matched and any associated discount information.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Constructor Summary
MatchingObject(java.lang.Object pMatchingObject, long pQuantity)
          Constructor to add a matched Object and quantity.
 
Method Summary
 void addDiscount(DiscountStructure pDiscount)
          Utility method to add another discount to the list of discounts.
 java.util.List<DiscountStructure> getDiscounts()
          Get property Discounts.
 java.util.Map<java.lang.Integer,java.lang.Long> getIteratorIndexMap()
          Get property IteratorIndexMap
 java.lang.Object getMatchingObject()
          Get property MatchingObject
The object that matched, typically a FilteredCommerceItem
 long getQuantity()
          Get property Quantity
The quantity of the object that matched
 void setDiscounts(java.util.List<DiscountStructure> pDiscounts)
          Set property Discounts
The List of discount structure of the object that matched
 void setIteratorIndexMap(int pIteratorIndex, long pMatchingQuantity)
          Set property IteratorIndexMap
 void setMatchingObject(java.lang.Object pMatchingObject)
          Set property MatchingObject
The object that matched, typically a FilteredCommerceItem
 void setQuantity(long pQuantity)
          Set property Quantity
The quantity of the object that matched
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values
Constructor Detail

MatchingObject

public MatchingObject(java.lang.Object pMatchingObject,
                      long pQuantity)
Constructor to add a matched Object and quantity.

Parameters:
pMatchingObject - Object that matched
pQuantity - long quantity
Method Detail

setMatchingObject

public void setMatchingObject(java.lang.Object pMatchingObject)
Set property MatchingObject
The object that matched, typically a FilteredCommerceItem

Parameters:
pMatchingObject - new Object value to set

getMatchingObject

public java.lang.Object getMatchingObject()
Get property MatchingObject
The object that matched, typically a FilteredCommerceItem

Returns:
Object that matched

setQuantity

public void setQuantity(long pQuantity)
Set property Quantity
The quantity of the object that matched

Parameters:
pQuantity - long new quantity to set

getQuantity

public long getQuantity()
Get property Quantity
The quantity of the object that matched

Returns:
Quantity long

setDiscounts

public void setDiscounts(java.util.List<DiscountStructure> pDiscounts)
Set property Discounts
The List of discount structure of the object that matched

Parameters:
pDiscounts - new DiscountStructure List to set

getDiscounts

public java.util.List<DiscountStructure> getDiscounts()
Get property Discounts.
The List of DiscountStructure of the object that matched

Returns:
List of DiscountStructure

setIteratorIndexMap

public void setIteratorIndexMap(int pIteratorIndex,
                                long pMatchingQuantity)
Set property IteratorIndexMap

Parameters:
pIteratorIndex - the index of the iterator that this object matched in
pMatchingQuantity - the matching quantity found for the given iterator

getIteratorIndexMap

public java.util.Map<java.lang.Integer,java.lang.Long> getIteratorIndexMap()
Get property IteratorIndexMap

Returns:
a map holding the matching iterator index (key) and the matching quantity (value)

addDiscount

public void addDiscount(DiscountStructure pDiscount)
Utility method to add another discount to the list of discounts.

Parameters:
pDiscount - DiscountStructure to add

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object