dojox/collections/Dictionary.js

  • Provides:

    • dojox.collections.Dictionary
  • Requires:

    • dojox.collections._base in common
  • dojox.collections.Dictionary

    • type
      Function
    • parameters:
      • dictionary: (typeof dojox.collections.Dictionary)
    • source: [view]
      dojo.provide("dojox.collections.Dictionary");
      dojo.require("dojox.collections._base");


      dojox.collections.Dictionary=function(/* dojox.collections.Dictionary? */dictionary){
       // summary
       // Returns an object of type dojox.collections.Dictionary
       var items={};
       this.count=0;


       // comparator for property addition and access.
       var testObject={};


       this.add=function(/* string */k, /* object */v){
        // summary
        // Add a new item to the Dictionary.
        var b=(k in items);
        items[k]=new dojox.collections.DictionaryEntry(k,v);
        if(!b){
         this.count++;
        }
       };
       this.clear=function(){
        // summary
        // Clears the internal dictionary.
        items={};
        this.count=0;
       };
       this.clone=function(){
        // summary
        // Returns a new instance of dojox.collections.Dictionary; note the the dictionary is a clone but items might not be.
        return new dojox.collections.Dictionary(this); // dojox.collections.Dictionary
       };
       this.contains=this.containsKey=function(/* string */k){
        // summary
        // Check to see if the dictionary has an entry at key "k".
        if(testObject[k]){
         return false;   // bool
        }
        return (items[k]!=null); // bool
       };
       this.containsValue=function(/* object */v){
        // summary
        // Check to see if the dictionary has an entry with value "v".
        var e=this.getIterator();
        while(e.get()){
         if(e.element.value==v){
          return true; // bool
         }
        }
        return false; // bool
       };
       this.entry=function(/* string */k){
        // summary
        // Accessor method; similar to dojox.collections.Dictionary.item but returns the actual Entry object.
        return items[k]; // dojox.collections.DictionaryEntry
       };
       this.forEach=function(/* function */ fn, /* object? */ scope){
        // summary
        // functional iterator, following the mozilla spec.
        var a=[]; // Create an indexing array
        for(var p in items) {
         if(!testObject[p]){
          a.push(items[p]); // fill it up
         }
        }
        dojo.forEach(a, fn, scope);
       };
       this.getKeyList=function(){
        // summary
        // Returns an array of the keys in the dictionary.
        return (this.getIterator()).map(function(entry){
         return entry.key;
        }); // array
       };
       this.getValueList=function(){
        // summary
        // Returns an array of the values in the dictionary.
        return (this.getIterator()).map(function(entry){
         return entry.value;
        }); // array
       };
       this.item=function(/* string */k){
        // summary
        // Accessor method.
        if(k in items){
         return items[k].valueOf(); // object
        }
        return undefined; // object
       };
       this.getIterator=function(){
        // summary
        // Gets a dojox.collections.DictionaryIterator for iteration purposes.
        return new dojox.collections.DictionaryIterator(items); // dojox.collections.DictionaryIterator
       };
       this.remove=function(/* string */k){
        // summary
        // Removes the item at k from the internal collection.
        if(k in items && !testObject[k]){
         delete items[k];
         this.count--;
         return true; // bool
        }
        return false; // bool
       };


       if (dictionary){
        var e=dictionary.getIterator();
        while(e.get()) {
          this.add(e.element.key, e.element.value);
        }
       }
    • returns
      dojox.collections.Dictionary|bool|dojox.collections.DictionaryEntry|object|dojox.collections.DictionaryIterator
    • summary
  • dojox.collections.Dictionary.count

    • summary
  • dojox.collections.Dictionary.contains

    • summary
  • dojox.collections.Dictionary.add

    • type
      Function
    • parameters:
      • k: (typeof string)
      • v: (typeof object)
    • source: [view]
      dojo.provide("dojox.collections.Dictionary");
      dojo.require("dojox.collections._base");


      dojox.collections.Dictionary=function(/* dojox.collections.Dictionary? */dictionary){
       // summary
       // Returns an object of type dojox.collections.Dictionary
       var items={};
       this.count=0;


       // comparator for property addition and access.
       var testObject={};


       this.add=function(/* string */k, /* object */v){
        // summary
        // Add a new item to the Dictionary.
        var b=(k in items);
        items[k]=new dojox.collections.DictionaryEntry(k,v);
        if(!b){
         this.count++;
        }
    • summary
  • dojox.collections.Dictionary.clear

    • type
      Function
    • source: [view]
      dojo.provide("dojox.collections.Dictionary");
      dojo.require("dojox.collections._base");


      dojox.collections.Dictionary=function(/* dojox.collections.Dictionary? */dictionary){
       // summary
       // Returns an object of type dojox.collections.Dictionary
       var items={};
       this.count=0;


       // comparator for property addition and access.
       var testObject={};


       this.add=function(/* string */k, /* object */v){
        // summary
        // Add a new item to the Dictionary.
        var b=(k in items);
        items[k]=new dojox.collections.DictionaryEntry(k,v);
        if(!b){
         this.count++;
        }
       };
       this.clear=function(){
        // summary
        // Clears the internal dictionary.
        items={};
        this.count=0;
    • summary
  • dojox.collections.Dictionary.clone

    • type
      Function
    • source: [view]
      dojo.provide("dojox.collections.Dictionary");
      dojo.require("dojox.collections._base");


      dojox.collections.Dictionary=function(/* dojox.collections.Dictionary? */dictionary){
       // summary
       // Returns an object of type dojox.collections.Dictionary
       var items={};
       this.count=0;


       // comparator for property addition and access.
       var testObject={};


       this.add=function(/* string */k, /* object */v){
        // summary
        // Add a new item to the Dictionary.
        var b=(k in items);
        items[k]=new dojox.collections.DictionaryEntry(k,v);
        if(!b){
         this.count++;
        }
       };
       this.clear=function(){
        // summary
        // Clears the internal dictionary.
        items={};
        this.count=0;
       };
       this.clone=function(){
        // summary
        // Returns a new instance of dojox.collections.Dictionary; note the the dictionary is a clone but items might not be.
        return new dojox.collections.Dictionary(this); // dojox.collections.Dictionary
    • returns
      dojox.collections.Dictionary
    • summary
  • dojox.collections.Dictionary.containsKey

    • type
      Function
    • parameters:
      • k: (typeof string)
    • source: [view]
      dojo.provide("dojox.collections.Dictionary");
      dojo.require("dojox.collections._base");


      dojox.collections.Dictionary=function(/* dojox.collections.Dictionary? */dictionary){
       // summary
       // Returns an object of type dojox.collections.Dictionary
       var items={};
       this.count=0;


       // comparator for property addition and access.
       var testObject={};


       this.add=function(/* string */k, /* object */v){
        // summary
        // Add a new item to the Dictionary.
        var b=(k in items);
        items[k]=new dojox.collections.DictionaryEntry(k,v);
        if(!b){
         this.count++;
        }
       };
       this.clear=function(){
        // summary
        // Clears the internal dictionary.
        items={};
        this.count=0;
       };
       this.clone=function(){
        // summary
        // Returns a new instance of dojox.collections.Dictionary; note the the dictionary is a clone but items might not be.
        return new dojox.collections.Dictionary(this); // dojox.collections.Dictionary
       };
       this.contains=this.containsKey=function(/* string */k){
        // summary
        // Check to see if the dictionary has an entry at key "k".
        if(testObject[k]){
         return false;   // bool
        }
        return (items[k]!=null); // bool
    • returns
      dojox.collections.Dictionary|bool
    • summary
  • dojox.collections.Dictionary.containsValue

    • type
      Function
    • parameters:
      • v: (typeof object)
    • source: [view]
      dojo.provide("dojox.collections.Dictionary");
      dojo.require("dojox.collections._base");


      dojox.collections.Dictionary=function(/* dojox.collections.Dictionary? */dictionary){
       // summary
       // Returns an object of type dojox.collections.Dictionary
       var items={};
       this.count=0;


       // comparator for property addition and access.
       var testObject={};


       this.add=function(/* string */k, /* object */v){
        // summary
        // Add a new item to the Dictionary.
        var b=(k in items);
        items[k]=new dojox.collections.DictionaryEntry(k,v);
        if(!b){
         this.count++;
        }
       };
       this.clear=function(){
        // summary
        // Clears the internal dictionary.
        items={};
        this.count=0;
       };
       this.clone=function(){
        // summary
        // Returns a new instance of dojox.collections.Dictionary; note the the dictionary is a clone but items might not be.
        return new dojox.collections.Dictionary(this); // dojox.collections.Dictionary
       };
       this.contains=this.containsKey=function(/* string */k){
        // summary
        // Check to see if the dictionary has an entry at key "k".
        if(testObject[k]){
         return false;   // bool
        }
        return (items[k]!=null); // bool
       };
       this.containsValue=function(/* object */v){
        // summary
        // Check to see if the dictionary has an entry with value "v".
        var e=this.getIterator();
        while(e.get()){
         if(e.element.value==v){
          return true; // bool
         }
        }
        return false; // bool
    • returns
      dojox.collections.Dictionary|bool
    • summary
  • dojox.collections.Dictionary.entry

    • type
      Function
    • parameters:
      • k: (typeof string)
    • source: [view]
      dojo.provide("dojox.collections.Dictionary");
      dojo.require("dojox.collections._base");


      dojox.collections.Dictionary=function(/* dojox.collections.Dictionary? */dictionary){
       // summary
       // Returns an object of type dojox.collections.Dictionary
       var items={};
       this.count=0;


       // comparator for property addition and access.
       var testObject={};


       this.add=function(/* string */k, /* object */v){
        // summary
        // Add a new item to the Dictionary.
        var b=(k in items);
        items[k]=new dojox.collections.DictionaryEntry(k,v);
        if(!b){
         this.count++;
        }
       };
       this.clear=function(){
        // summary
        // Clears the internal dictionary.
        items={};
        this.count=0;
       };
       this.clone=function(){
        // summary
        // Returns a new instance of dojox.collections.Dictionary; note the the dictionary is a clone but items might not be.
        return new dojox.collections.Dictionary(this); // dojox.collections.Dictionary
       };
       this.contains=this.containsKey=function(/* string */k){
        // summary
        // Check to see if the dictionary has an entry at key "k".
        if(testObject[k]){
         return false;   // bool
        }
        return (items[k]!=null); // bool
       };
       this.containsValue=function(/* object */v){
        // summary
        // Check to see if the dictionary has an entry with value "v".
        var e=this.getIterator();
        while(e.get()){
         if(e.element.value==v){
          return true; // bool
         }
        }
        return false; // bool
       };
       this.entry=function(/* string */k){
        // summary
        // Accessor method; similar to dojox.collections.Dictionary.item but returns the actual Entry object.
        return items[k]; // dojox.collections.DictionaryEntry
    • returns
      dojox.collections.Dictionary|bool|dojox.collections.DictionaryEntry
    • summary
  • dojox.collections.Dictionary.forEach

    • type
      Function
    • parameters:
      • fn: (typeof function)
      • scope: (typeof object)
    • source: [view]
      dojo.provide("dojox.collections.Dictionary");
      dojo.require("dojox.collections._base");


      dojox.collections.Dictionary=function(/* dojox.collections.Dictionary? */dictionary){
       // summary
       // Returns an object of type dojox.collections.Dictionary
       var items={};
       this.count=0;


       // comparator for property addition and access.
       var testObject={};


       this.add=function(/* string */k, /* object */v){
        // summary
        // Add a new item to the Dictionary.
        var b=(k in items);
        items[k]=new dojox.collections.DictionaryEntry(k,v);
        if(!b){
         this.count++;
        }
       };
       this.clear=function(){
        // summary
        // Clears the internal dictionary.
        items={};
        this.count=0;
       };
       this.clone=function(){
        // summary
        // Returns a new instance of dojox.collections.Dictionary; note the the dictionary is a clone but items might not be.
        return new dojox.collections.Dictionary(this); // dojox.collections.Dictionary
       };
       this.contains=this.containsKey=function(/* string */k){
        // summary
        // Check to see if the dictionary has an entry at key "k".
        if(testObject[k]){
         return false;   // bool
        }
        return (items[k]!=null); // bool
       };
       this.containsValue=function(/* object */v){
        // summary
        // Check to see if the dictionary has an entry with value "v".
        var e=this.getIterator();
        while(e.get()){
         if(e.element.value==v){
          return true; // bool
         }
        }
        return false; // bool
       };
       this.entry=function(/* string */k){
        // summary
        // Accessor method; similar to dojox.collections.Dictionary.item but returns the actual Entry object.
        return items[k]; // dojox.collections.DictionaryEntry
       };
       this.forEach=function(/* function */ fn, /* object? */ scope){
        // summary
        // functional iterator, following the mozilla spec.
        var a=[]; // Create an indexing array
        for(var p in items) {
         if(!testObject[p]){
          a.push(items[p]); // fill it up
         }
        }
        dojo.forEach(a, fn, scope);
    • returns
      dojox.collections.Dictionary|bool|dojox.collections.DictionaryEntry
    • summary
  • dojox.collections.Dictionary.getKeyList

    • type
      Function
    • source: [view]
      dojo.provide("dojox.collections.Dictionary");
      dojo.require("dojox.collections._base");


      dojox.collections.Dictionary=function(/* dojox.collections.Dictionary? */dictionary){
       // summary
       // Returns an object of type dojox.collections.Dictionary
       var items={};
       this.count=0;


       // comparator for property addition and access.
       var testObject={};


       this.add=function(/* string */k, /* object */v){
        // summary
        // Add a new item to the Dictionary.
        var b=(k in items);
        items[k]=new dojox.collections.DictionaryEntry(k,v);
        if(!b){
         this.count++;
        }
       };
       this.clear=function(){
        // summary
        // Clears the internal dictionary.
        items={};
        this.count=0;
       };
       this.clone=function(){
        // summary
        // Returns a new instance of dojox.collections.Dictionary; note the the dictionary is a clone but items might not be.
        return new dojox.collections.Dictionary(this); // dojox.collections.Dictionary
       };
       this.contains=this.containsKey=function(/* string */k){
        // summary
        // Check to see if the dictionary has an entry at key "k".
        if(testObject[k]){
         return false;   // bool
        }
        return (items[k]!=null); // bool
       };
       this.containsValue=function(/* object */v){
        // summary
        // Check to see if the dictionary has an entry with value "v".
        var e=this.getIterator();
        while(e.get()){
         if(e.element.value==v){
          return true; // bool
         }
        }
        return false; // bool
       };
       this.entry=function(/* string */k){
        // summary
        // Accessor method; similar to dojox.collections.Dictionary.item but returns the actual Entry object.
        return items[k]; // dojox.collections.DictionaryEntry
       };
       this.forEach=function(/* function */ fn, /* object? */ scope){
        // summary
        // functional iterator, following the mozilla spec.
        var a=[]; // Create an indexing array
        for(var p in items) {
         if(!testObject[p]){
          a.push(items[p]); // fill it up
         }
        }
        dojo.forEach(a, fn, scope);
       };
       this.getKeyList=function(){
        // summary
        // Returns an array of the keys in the dictionary.
        return (this.getIterator()).map(function(entry){
         return entry.key;
        }); // array
    • returns
      dojox.collections.Dictionary|bool|dojox.collections.DictionaryEntry
    • summary
  • dojox.collections.Dictionary.getValueList

    • type
      Function
    • source: [view]
      dojo.provide("dojox.collections.Dictionary");
      dojo.require("dojox.collections._base");


      dojox.collections.Dictionary=function(/* dojox.collections.Dictionary? */dictionary){
       // summary
       // Returns an object of type dojox.collections.Dictionary
       var items={};
       this.count=0;


       // comparator for property addition and access.
       var testObject={};


       this.add=function(/* string */k, /* object */v){
        // summary
        // Add a new item to the Dictionary.
        var b=(k in items);
        items[k]=new dojox.collections.DictionaryEntry(k,v);
        if(!b){
         this.count++;
        }
       };
       this.clear=function(){
        // summary
        // Clears the internal dictionary.
        items={};
        this.count=0;
       };
       this.clone=function(){
        // summary
        // Returns a new instance of dojox.collections.Dictionary; note the the dictionary is a clone but items might not be.
        return new dojox.collections.Dictionary(this); // dojox.collections.Dictionary
       };
       this.contains=this.containsKey=function(/* string */k){
        // summary
        // Check to see if the dictionary has an entry at key "k".
        if(testObject[k]){
         return false;   // bool
        }
        return (items[k]!=null); // bool
       };
       this.containsValue=function(/* object */v){
        // summary
        // Check to see if the dictionary has an entry with value "v".
        var e=this.getIterator();
        while(e.get()){
         if(e.element.value==v){
          return true; // bool
         }
        }
        return false; // bool
       };
       this.entry=function(/* string */k){
        // summary
        // Accessor method; similar to dojox.collections.Dictionary.item but returns the actual Entry object.
        return items[k]; // dojox.collections.DictionaryEntry
       };
       this.forEach=function(/* function */ fn, /* object? */ scope){
        // summary
        // functional iterator, following the mozilla spec.
        var a=[]; // Create an indexing array
        for(var p in items) {
         if(!testObject[p]){
          a.push(items[p]); // fill it up
         }
        }
        dojo.forEach(a, fn, scope);
       };
       this.getKeyList=function(){
        // summary
        // Returns an array of the keys in the dictionary.
        return (this.getIterator()).map(function(entry){
         return entry.key;
        }); // array
       };
       this.getValueList=function(){
        // summary
        // Returns an array of the values in the dictionary.
        return (this.getIterator()).map(function(entry){
         return entry.value;
        }); // array
    • returns
      dojox.collections.Dictionary|bool|dojox.collections.DictionaryEntry
    • summary
  • dojox.collections.Dictionary.item

    • type
      Function
    • parameters:
      • k: (typeof string)
    • source: [view]
      dojo.provide("dojox.collections.Dictionary");
      dojo.require("dojox.collections._base");


      dojox.collections.Dictionary=function(/* dojox.collections.Dictionary? */dictionary){
       // summary
       // Returns an object of type dojox.collections.Dictionary
       var items={};
       this.count=0;


       // comparator for property addition and access.
       var testObject={};


       this.add=function(/* string */k, /* object */v){
        // summary
        // Add a new item to the Dictionary.
        var b=(k in items);
        items[k]=new dojox.collections.DictionaryEntry(k,v);
        if(!b){
         this.count++;
        }
       };
       this.clear=function(){
        // summary
        // Clears the internal dictionary.
        items={};
        this.count=0;
       };
       this.clone=function(){
        // summary
        // Returns a new instance of dojox.collections.Dictionary; note the the dictionary is a clone but items might not be.
        return new dojox.collections.Dictionary(this); // dojox.collections.Dictionary
       };
       this.contains=this.containsKey=function(/* string */k){
        // summary
        // Check to see if the dictionary has an entry at key "k".
        if(testObject[k]){
         return false;   // bool
        }
        return (items[k]!=null); // bool
       };
       this.containsValue=function(/* object */v){
        // summary
        // Check to see if the dictionary has an entry with value "v".
        var e=this.getIterator();
        while(e.get()){
         if(e.element.value==v){
          return true; // bool
         }
        }
        return false; // bool
       };
       this.entry=function(/* string */k){
        // summary
        // Accessor method; similar to dojox.collections.Dictionary.item but returns the actual Entry object.
        return items[k]; // dojox.collections.DictionaryEntry
       };
       this.forEach=function(/* function */ fn, /* object? */ scope){
        // summary
        // functional iterator, following the mozilla spec.
        var a=[]; // Create an indexing array
        for(var p in items) {
         if(!testObject[p]){
          a.push(items[p]); // fill it up
         }
        }
        dojo.forEach(a, fn, scope);
       };
       this.getKeyList=function(){
        // summary
        // Returns an array of the keys in the dictionary.
        return (this.getIterator()).map(function(entry){
         return entry.key;
        }); // array
       };
       this.getValueList=function(){
        // summary
        // Returns an array of the values in the dictionary.
        return (this.getIterator()).map(function(entry){
         return entry.value;
        }); // array
       };
       this.item=function(/* string */k){
        // summary
        // Accessor method.
        if(k in items){
         return items[k].valueOf(); // object
        }
        return undefined; // object
    • returns
      dojox.collections.Dictionary|bool|dojox.collections.DictionaryEntry|object
    • summary
  • dojox.collections.Dictionary.getIterator

    • type
      Function
    • source: [view]
      dojo.provide("dojox.collections.Dictionary");
      dojo.require("dojox.collections._base");


      dojox.collections.Dictionary=function(/* dojox.collections.Dictionary? */dictionary){
       // summary
       // Returns an object of type dojox.collections.Dictionary
       var items={};
       this.count=0;


       // comparator for property addition and access.
       var testObject={};


       this.add=function(/* string */k, /* object */v){
        // summary
        // Add a new item to the Dictionary.
        var b=(k in items);
        items[k]=new dojox.collections.DictionaryEntry(k,v);
        if(!b){
         this.count++;
        }
       };
       this.clear=function(){
        // summary
        // Clears the internal dictionary.
        items={};
        this.count=0;
       };
       this.clone=function(){
        // summary
        // Returns a new instance of dojox.collections.Dictionary; note the the dictionary is a clone but items might not be.
        return new dojox.collections.Dictionary(this); // dojox.collections.Dictionary
       };
       this.contains=this.containsKey=function(/* string */k){
        // summary
        // Check to see if the dictionary has an entry at key "k".
        if(testObject[k]){
         return false;   // bool
        }
        return (items[k]!=null); // bool
       };
       this.containsValue=function(/* object */v){
        // summary
        // Check to see if the dictionary has an entry with value "v".
        var e=this.getIterator();
        while(e.get()){
         if(e.element.value==v){
          return true; // bool
         }
        }
        return false; // bool
       };
       this.entry=function(/* string */k){
        // summary
        // Accessor method; similar to dojox.collections.Dictionary.item but returns the actual Entry object.
        return items[k]; // dojox.collections.DictionaryEntry
       };
       this.forEach=function(/* function */ fn, /* object? */ scope){
        // summary
        // functional iterator, following the mozilla spec.
        var a=[]; // Create an indexing array
        for(var p in items) {
         if(!testObject[p]){
          a.push(items[p]); // fill it up
         }
        }
        dojo.forEach(a, fn, scope);
       };
       this.getKeyList=function(){
        // summary
        // Returns an array of the keys in the dictionary.
        return (this.getIterator()).map(function(entry){
         return entry.key;
        }); // array
       };
       this.getValueList=function(){
        // summary
        // Returns an array of the values in the dictionary.
        return (this.getIterator()).map(function(entry){
         return entry.value;
        }); // array
       };
       this.item=function(/* string */k){
        // summary
        // Accessor method.
        if(k in items){
         return items[k].valueOf(); // object
        }
        return undefined; // object
       };
       this.getIterator=function(){
        // summary
        // Gets a dojox.collections.DictionaryIterator for iteration purposes.
        return new dojox.collections.DictionaryIterator(items); // dojox.collections.DictionaryIterator
    • returns
      dojox.collections.Dictionary|bool|dojox.collections.DictionaryEntry|object|dojox.collections.DictionaryIterator
    • summary
  • dojox.collections.Dictionary.remove

    • type
      Function
    • parameters:
      • k: (typeof string)
    • source: [view]
      dojo.provide("dojox.collections.Dictionary");
      dojo.require("dojox.collections._base");


      dojox.collections.Dictionary=function(/* dojox.collections.Dictionary? */dictionary){
       // summary
       // Returns an object of type dojox.collections.Dictionary
       var items={};
       this.count=0;


       // comparator for property addition and access.
       var testObject={};


       this.add=function(/* string */k, /* object */v){
        // summary
        // Add a new item to the Dictionary.
        var b=(k in items);
        items[k]=new dojox.collections.DictionaryEntry(k,v);
        if(!b){
         this.count++;
        }
       };
       this.clear=function(){
        // summary
        // Clears the internal dictionary.
        items={};
        this.count=0;
       };
       this.clone=function(){
        // summary
        // Returns a new instance of dojox.collections.Dictionary; note the the dictionary is a clone but items might not be.
        return new dojox.collections.Dictionary(this); // dojox.collections.Dictionary
       };
       this.contains=this.containsKey=function(/* string */k){
        // summary
        // Check to see if the dictionary has an entry at key "k".
        if(testObject[k]){
         return false;   // bool
        }
        return (items[k]!=null); // bool
       };
       this.containsValue=function(/* object */v){
        // summary
        // Check to see if the dictionary has an entry with value "v".
        var e=this.getIterator();
        while(e.get()){
         if(e.element.value==v){
          return true; // bool
         }
        }
        return false; // bool
       };
       this.entry=function(/* string */k){
        // summary
        // Accessor method; similar to dojox.collections.Dictionary.item but returns the actual Entry object.
        return items[k]; // dojox.collections.DictionaryEntry
       };
       this.forEach=function(/* function */ fn, /* object? */ scope){
        // summary
        // functional iterator, following the mozilla spec.
        var a=[]; // Create an indexing array
        for(var p in items) {
         if(!testObject[p]){
          a.push(items[p]); // fill it up
         }
        }
        dojo.forEach(a, fn, scope);
       };
       this.getKeyList=function(){
        // summary
        // Returns an array of the keys in the dictionary.
        return (this.getIterator()).map(function(entry){
         return entry.key;
        }); // array
       };
       this.getValueList=function(){
        // summary
        // Returns an array of the values in the dictionary.
        return (this.getIterator()).map(function(entry){
         return entry.value;
        }); // array
       };
       this.item=function(/* string */k){
        // summary
        // Accessor method.
        if(k in items){
         return items[k].valueOf(); // object
        }
        return undefined; // object
       };
       this.getIterator=function(){
        // summary
        // Gets a dojox.collections.DictionaryIterator for iteration purposes.
        return new dojox.collections.DictionaryIterator(items); // dojox.collections.DictionaryIterator
       };
       this.remove=function(/* string */k){
        // summary
        // Removes the item at k from the internal collection.
        if(k in items && !testObject[k]){
         delete items[k];
         this.count--;
         return true; // bool
        }
        return false; // bool
    • returns
      dojox.collections.Dictionary|bool|dojox.collections.DictionaryEntry|object|dojox.collections.DictionaryIterator
    • summary
  • dojox.collections

    • type
      Object
    • summary
  • dojox

    • type
      Object
    • summary