summaryrefslogtreecommitdiff
path: root/includes/js/dojox/collections/Set.js
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-14 15:39:19 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-14 15:39:19 +0000
commit1c5685d68f1b73270fb814fe04cbb490eb90ba5f (patch)
tree3d3ada08a934b96fc31531f1327690d7edc6f766 /includes/js/dojox/collections/Set.js
parent104d59099e048688c4dbac37d72137006e396558 (diff)
downloadsemanticscuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.gz
semanticscuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.bz2
Minor fix: Remove DOJO library (60Mo) replaced by link to Google CDN (online DOJO library)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@159 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'includes/js/dojox/collections/Set.js')
-rw-r--r--includes/js/dojox/collections/Set.js89
1 files changed, 0 insertions, 89 deletions
diff --git a/includes/js/dojox/collections/Set.js b/includes/js/dojox/collections/Set.js
deleted file mode 100644
index 6796c1d..0000000
--- a/includes/js/dojox/collections/Set.js
+++ /dev/null
@@ -1,89 +0,0 @@
-if(!dojo._hasResource["dojox.collections.Set"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.collections.Set"] = true;
-dojo.provide("dojox.collections.Set");
-dojo.require("dojox.collections.ArrayList");
-
-(function(){
- var dxc=dojox.collections;
- dxc.Set=new (function(){
- function conv(arr){
- if(arr.constructor==Array){
- return new dojox.collections.ArrayList(arr); // dojox.collections.ArrayList
- }
- return arr; // dojox.collections.ArrayList
- }
- this.union = function(/* array */setA, /* array */setB){
- // summary
- // Return the union of the two passed sets.
- setA=conv(setA);
- setB=conv(setB);
- var result = new dojox.collections.ArrayList(setA.toArray());
- var e = setB.getIterator();
- while(!e.atEnd()){
- var item=e.get();
- if(!result.contains(item)){
- result.add(item);
- }
- }
- return result; // dojox.collections.ArrayList
- };
- this.intersection = function(/* array */setA, /* array */setB){
- // summary
- // Return the intersection of the two passed sets.
- setA=conv(setA);
- setB=conv(setB);
- var result = new dojox.collections.ArrayList();
- var e = setB.getIterator();
- while(!e.atEnd()){
- var item=e.get();
- if(setA.contains(item)){
- result.add(item);
- }
- }
- return result; // dojox.collections.ArrayList
- };
- this.difference = function(/* array */setA, /* array */setB){
- // summary
- // Returns everything in setA that is not in setB.
- setA=conv(setA);
- setB=conv(setB);
- var result = new dojox.collections.ArrayList();
- var e=setA.getIterator();
- while(!e.atEnd()){
- var item=e.get();
- if(!setB.contains(item)){
- result.add(item);
- }
- }
- return result; // dojox.collections.ArrayList
- };
- this.isSubSet = function(/* array */setA, /* array */setB) {
- // summary
- // Returns if set B is a subset of set A.
- setA=conv(setA);
- setB=conv(setB);
- var e = setA.getIterator();
- while(!e.atEnd()){
- if(!setB.contains(e.get())){
- return false; // boolean
- }
- }
- return true; // boolean
- };
- this.isSuperSet = function(/* array */setA, /* array */setB){
- // summary
- // Returns if set B is a superset of set A.
- setA=conv(setA);
- setB=conv(setB);
- var e = setB.getIterator();
- while(!e.atEnd()){
- if(!setA.contains(e.get())){
- return false; // boolean
- }
- }
- return true; // boolean
- };
- })();
-})();
-
-}