© 2002 BEA Systems, Inc.


com.bea.commerce.ebusiness.price.engine
Class DiscountComparator

java.lang.Object
  |
  +--com.bea.commerce.ebusiness.price.engine.DiscountComparator

public class DiscountComparator
extends java.lang.Object
implements java.util.Comparator, java.io.Serializable

This class is used in conjunction with java.util.Collection and QualificationDiscountDef objects to compare them by priority. We assume that only order or only item discounts will be presented to this comparator.

See Also:
Serialized Form

Field Summary
static java.lang.String cName
           
 
Constructor Summary
DiscountComparator()
           
 
Method Summary
 int compare(java.lang.Object objectA, java.lang.Object objectB)
          throws class cast exception if objects are not QualificationDiscountDefs.
 boolean equals(java.lang.Object object)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cName

public static final java.lang.String cName
Constructor Detail

DiscountComparator

public DiscountComparator()
Method Detail

compare

public int compare(java.lang.Object objectA,
                   java.lang.Object objectB)
throws class cast exception if objects are not QualificationDiscountDefs.
Specified by:
compare in interface java.util.Comparator


equals

public boolean equals(java.lang.Object object)
Specified by:
equals in interface java.util.Comparator

Overrides:
equals in class java.lang.Object

© 2002 BEA Systems, Inc.

Copyright © 2002 BEA Systems, Inc. All Rights Reserved