1 dojo.provide("calitha.collections.IComparator"); 2 dojo.require("calitha.exception.VirtualFunctionException"); 3 4 /** 5 * @name calitha.collections.IComparator 6 * @class A comparison function, which imposes a total ordering on some collection of objects. 7 * <p> 8 * It is based on the 9 * <a href="http://java.sun.com/javase/6/docs/api/java/util/Comparator.html">Java Comparator interface</a>. 10 */ 11 dojo.declare("calitha.collections.IComparator", null, 12 /** @lends calitha.collections.IComparator#*/ 13 { 14 /** 15 * @function 16 * @param o1 the first object to be compared. 17 * @param o2 the second object to be compared. 18 * @returns {Boolean} a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second. 19 * @description Compares its two arguments for order. 20 */ 21 compare: function(/**Object*/ o1, /**Object*/ o2) 22 {throw new calitha.exception.VirtualFunctionException(Error());} 23 }); 24