Just a note, I think the normal way to do it in Java would be to use java.util.Comparator objects in a 'comparable' way to your use of Functors. The queues could accept a Comparator in their constructors, and use its "int compare(Object a, Object b)" method for ordering - perhaps handled in an abstract base class.
It's entirely possible that I'm not appreciating the ML code (not familiar with it), but the Java version could/should/would be neatly done without the "combinatorial explosion".