Changeset 57

Show
Ignore:
Timestamp:
04/04/06 21:17:08 (2 years ago)
Author:
Jan-Klaas Kollhof
Message:

some spelling corrections

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/jsolait/lib/sets.js

    r49 r57  
    4646    /** 
    4747        The Set class. 
    48         Items in a class must be Strings, Numbers, Objects that return a unique string representation or 
    49         Objects implementing a __hash__ method. (All objects created from jsolait classes have a __hash__ function. 
     48        All Items added to a set must be hashable using jsolait's hash() function. 
    5049    **/ 
    5150    mod.Set=Class(function(publ, supr){ 
     
    127126            @return True if the set is a subset of setObj. False otherwise. 
    128127        **/ 
    129         publ.isSubSet = function(setObj){ 
     128        publ.isSubset = function(setObj){ 
    130129            for(var n in this.items){ 
    131130                if(setObj.contains(this.items[n])==false){ 
     
    141140            @return True if the set is a super set of setObj. False otherwise. 
    142141        **/ 
    143         publ.isSuperSet = function(setObj){ 
    144             return setObj.isSubSet(this); 
     142        publ.isSuperset = function(setObj){ 
     143            return setObj.isSubset(this); 
    145144        }; 
    146145 
     
    151150        **/ 
    152151        publ.equals=function(setObj){ 
    153             return (this.isSubSet(setObj) && setObj.isSubSet(this)); 
     152            return (this.isSubset(setObj) && setObj.isSubset(this)); 
    154153        }; 
    155154 
    156155        publ.__eq__=function(setObj){ 
    157             if(setObj.isSubSet!==undefined){ 
     156            if(setObj.isSubset!==undefined){ 
    158157                return this.equals(setObj); 
    159158            }else{ 
     
    297296        }; 
    298297 
    299         publ.toString=function(){ 
     298        publ.__str__=function(){ 
    300299            var items =[]; 
    301300            for(var n in this.items){ 
     
    305304        }; 
    306305    }); 
    307  
    308306}); 
    309307