/* ********************************** * DerivativeComparatorForList.java * DerivativeComparatorForList ************************************/ package utils.comparator; import edu.neu.ccs.demeterf.demfgen.lib.List.Comp; import gen.Derivative; /** Class to determine whether two derivatives are same */ public class DerivativeComp extends Comp<Derivative>{ public boolean comp(Derivative a, Derivative b) { return (a.name.equals(b.name) && a.price.equals(b.price) && a.seller.equals(b.seller) && a.type.equals(b.type)); } }