edu.neu.ccs.demeterf.dispatch
Class TypeSort<M>

java.lang.Object
  extended by edu.neu.ccs.demeterf.lib.List.GComp<X,X>
      extended by edu.neu.ccs.demeterf.lib.List.Comp<DBEntry<M>>
          extended by edu.neu.ccs.demeterf.dispatch.TypeSort<M>

public class TypeSort<M>
extends List.Comp<DBEntry<M>>

Implementation of Lessthan for sorting DBEntries. The most specific method is the one with the most specific parameter types. If the types of one method are a prefix of the other (same types, but the second is longer) then we choose the method with more arguments.


Constructor Summary
TypeSort()
           
 
Method Summary
 boolean comp(DBEntry<M> e1, DBEntry<M> e2)
          Compare these two Xs, returning true/false
static
<M> boolean
compare(DBEntry<M> e1, DBEntry<M> e2)
           
 
Methods inherited from class edu.neu.ccs.demeterf.lib.List.GComp
curry, flip, revCurry
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeSort

public TypeSort()
Method Detail

comp

public boolean comp(DBEntry<M> e1,
                    DBEntry<M> e2)
Description copied from class: List.GComp
Compare these two Xs, returning true/false

Specified by:
comp in class List.GComp<DBEntry<M>,DBEntry<M>>

compare

public static <M> boolean compare(DBEntry<M> e1,
                                  DBEntry<M> e2)