1 dojo.provide("calitha.collections.ISortedSet");
  2 dojo.require("calitha.collections.ISet");
  3 dojo.require("calitha.exception.VirtualFunctionException");
  4 
  5 /**
  6  * @name calitha.collections.ISortedSet
  7  * @class A Map that further provides a total ordering on its keys.
  8  * <p>
  9  * It is based on the
 10  * <a href="http://java.sun.com/javase/6/docs/api/java/util/SortedSet.html">Java SortedSet interface</a>.
 11  * Differences are:
 12  * <p>
 13  * <ul>
 14  * <li>In Java it is the NavigableSet interface that has methods with extra inclusive parameters for subSet and such.
 15  * Those methods have been put in this ISortedSet class to replace those same methods without the inclusive parameters.
 16  * This is done because overloading methods with inheritance too would be too confusing. And the methods with inclusive
 17  * parameters are more clear anyway.
 18  * </ul>
 19  * @extends calitha.collections.ISet
 20  */
 21 dojo.declare("calitha.collections.ISortedSet", calitha.collections.ISet,
 22 /** @lends calitha.collections.ISortedSet# */
 23 {
 24     /**
 25      * @function
 26      * @returns {calitha.collections.IComparator} the comparator used to order the elements in this set,
 27      * or null if this set uses the natural ordering of its elements
 28      * @description A Set that further provides a total ordering on its elements.
 29      */
 30     comparator: function()
 31     {throw new calitha.exception.VirtualFunctionException(Error());}
 32     ,
 33     /**
 34      * @function
 35      * @returns {Object} the first (lowest) element currently in this set 
 36      * @description Returns the first (lowest) element currently in this set.
 37      */
 38     first: function()
 39     {throw new calitha.exception.VirtualFunctionException(Error());}
 40     ,
 41     /**
 42      * @function
 43      * @param toElement high endpoint of the returned set
 44      * @param inclusive true if the high endpoint is to be included in the returned view
 45      * @returns {calitha.collections.ISortedSet} a view of the portion of this set whose elements are less than
 46      * (or equal to, if inclusive is true) toElement
 47      * @description Returns a view of the portion of this set whose elements are less than
 48      * (or equal to, if inclusive is true) toElement.
 49      */
 50     headSet: function(/**Object*/ toElement, /**Boolean*/ inclusive)
 51     {throw new calitha.exception.VirtualFunctionException(Error());}
 52     ,
 53     /**
 54      * @function
 55      * @returns {Object} the last (highest) element currently in this set
 56      * @description  Returns the last (highest) element currently in this set.
 57      */
 58     last: function()
 59     {throw new calitha.exception.VirtualFunctionException(Error());}
 60     ,
 61     /**
 62      * @function
 63      * @param fromElement low endpoint of the returned set
 64      * @param fromInclusive true if the low endpoint is to be included in the returned view
 65      * @param toElement high endpoint of the returned set
 66      * @param toInclusive true if the high endpoint is to be included in the returned view
 67      * @returns {calitha.collections.ISortedSet} a view of the portion of this set whose elements range from fromElement,
 68      * inclusive, to toElement, exclusive
 69      * @description Returns a view of the portion of this set whose elements range from fromElement to toElement.
 70      */
 71     subSet: function(/**Object*/ fromElement, /**Boolean*/ fromInclusive, /**Object*/ toElement, /**Boolean*/ toInclusive)
 72     {throw new calitha.exception.VirtualFunctionException(Error());}
 73     ,
 74     /**
 75      * @function
 76      * @param fromElement low endpoint of the returned set
 77      * @param inclusive true if the low endpoint is to be included in the returned view
 78      * @returns {calitha.collections.ISortedSet} a view of the portion of this set whose elements are greater than
 79      * or equal to fromElement
 80      * @description Returns a view of the portion of this set whose elements are greater than (or equal to,
 81      * if inclusive is true) fromElement.
 82      */
 83     tailSet: function(/**Object*/ fromElement, /**Boolean*/ inclusive)
 84     {throw new calitha.exception.VirtualFunctionException(Error());}
 85 });
 86