summaryrefslogtreecommitdiff
path: root/includes/js/dojox/collections/_base.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/_base.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/_base.js')
-rw-r--r--includes/js/dojox/collections/_base.js100
1 files changed, 0 insertions, 100 deletions
diff --git a/includes/js/dojox/collections/_base.js b/includes/js/dojox/collections/_base.js
deleted file mode 100644
index 28862d5..0000000
--- a/includes/js/dojox/collections/_base.js
+++ /dev/null
@@ -1,100 +0,0 @@
-if(!dojo._hasResource["dojox.collections._base"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.collections._base"] = true;
-dojo.provide("dojox.collections._base");
-
-dojox.collections.DictionaryEntry=function(/* string */k, /* object */v){
- // summary
- // return an object of type dojox.collections.DictionaryEntry
- this.key=k;
- this.value=v;
- this.valueOf=function(){
- return this.value; // object
- };
- this.toString=function(){
- return String(this.value); // string
- };
-}
-
-/* Iterators
- * The collections.Iterators (Iterator and DictionaryIterator) are built to
- * work with the Collections included in this module. However, they *can*
- * be used with arrays and objects, respectively, should one choose to do so.
- */
-dojox.collections.Iterator=function(/* array */arr){
- // summary
- // return an object of type dojox.collections.Iterator
- var a=arr;
- var position=0;
- this.element=a[position]||null;
- this.atEnd=function(){
- // summary
- // Test to see if the internal cursor has reached the end of the internal collection.
- return (position>=a.length); // bool
- };
- this.get=function(){
- // summary
- // Get the next member in the collection.
- if(this.atEnd()){
- return null; // object
- }
- this.element=a[position++];
- return this.element; // object
- };
- this.map=function(/* function */fn, /* object? */scope){
- // summary
- // Functional iteration with optional scope.
- return dojo.map(a, fn, scope);
- };
- this.reset=function(){
- // summary
- // reset the internal cursor.
- position=0;
- this.element=a[position];
- };
-}
-
-/* Notes:
- * The DictionaryIterator no longer supports a key and value property;
- * the reality is that you can use this to iterate over a JS object
- * being used as a hashtable.
- */
-dojox.collections.DictionaryIterator=function(/* object */obj){
- // summary
- // return an object of type dojox.collections.DictionaryIterator
- var a=[]; // Create an indexing array
- var testObject={};
- for(var p in obj){
- if(!testObject[p]){
- a.push(obj[p]); // fill it up
- }
- }
- var position=0;
- this.element=a[position]||null;
- this.atEnd=function(){
- // summary
- // Test to see if the internal cursor has reached the end of the internal collection.
- return (position>=a.length); // bool
- };
- this.get=function(){
- // summary
- // Get the next member in the collection.
- if(this.atEnd()){
- return null; // object
- }
- this.element=a[position++];
- return this.element; // object
- };
- this.map=function(/* function */fn, /* object? */scope){
- // summary
- // Functional iteration with optional scope.
- return dojo.map(a, fn, scope);
- };
- this.reset=function() {
- // summary
- // reset the internal cursor.
- position=0;
- this.element=a[position];
- };
-};
-
-}