/* ********************************** * DerivativeComparator.java * DerivativeComparator ************************************/ package utils.comparator; import edu.neu.ccs.demeterf.demfgen.lib.List.Pred; import gen.Derivative; /** Class to determine whether two derivatives are same */ public class SameDerivative extends Pred<Derivative>{ Derivative look; public SameDerivative(Derivative l){ look = l; } public boolean huh(Derivative d) { return (d.name.equals(look.name) && d.price.equals(look.price) && d.seller.equals(look.seller) && d.type.equals(look.type)); } }