diff options
author | adhitya | 2016-04-10 12:28:28 +0000 |
---|---|---|
committer | adhitya | 2016-04-10 12:28:28 +0000 |
commit | 0b1c069f88dab0288a01c6aed4d77f4e6d2f6474 (patch) | |
tree | b5ae6b1f512a674f79674a12f675d22324cd268f /src/js/util/mxDictionary.js | |
parent | 1993f1da86e293aaf9996b8d7a4f6d9a9224f270 (diff) | |
download | xcos-on-web-0b1c069f88dab0288a01c6aed4d77f4e6d2f6474.tar.gz xcos-on-web-0b1c069f88dab0288a01c6aed4d77f4e6d2f6474.tar.bz2 xcos-on-web-0b1c069f88dab0288a01c6aed4d77f4e6d2f6474.zip |
Removed (un)necessary files
Diffstat (limited to 'src/js/util/mxDictionary.js')
-rw-r--r-- | src/js/util/mxDictionary.js | 130 |
1 files changed, 0 insertions, 130 deletions
diff --git a/src/js/util/mxDictionary.js b/src/js/util/mxDictionary.js deleted file mode 100644 index a2e503a..0000000 --- a/src/js/util/mxDictionary.js +++ /dev/null @@ -1,130 +0,0 @@ -/** - * $Id: mxDictionary.js,v 1.12 2012-04-26 08:08:54 gaudenz Exp $ - * Copyright (c) 2006-2010, JGraph Ltd - */ -/** - * Class: mxDictionary - * - * A wrapper class for an associative array with object keys. Note: This - * implementation uses <mxObjectIdentitiy> to turn object keys into strings. - * - * Constructor: mxEventSource - * - * Constructs a new dictionary which allows object to be used as keys. - */ -function mxDictionary() -{ - this.clear(); -}; - -/** - * Function: map - * - * Stores the (key, value) pairs in this dictionary. - */ -mxDictionary.prototype.map = null; - -/** - * Function: clear - * - * Clears the dictionary. - */ -mxDictionary.prototype.clear = function() -{ - this.map = {}; -}; - -/** - * Function: get - * - * Returns the value for the given key. - */ -mxDictionary.prototype.get = function(key) -{ - var id = mxObjectIdentity.get(key); - - return this.map[id]; -}; - -/** - * Function: put - * - * Stores the value under the given key and returns the previous - * value for that key. - */ -mxDictionary.prototype.put = function(key, value) -{ - var id = mxObjectIdentity.get(key); - var previous = this.map[id]; - this.map[id] = value; - - return previous; -}; - -/** - * Function: remove - * - * Removes the value for the given key and returns the value that - * has been removed. - */ -mxDictionary.prototype.remove = function(key) -{ - var id = mxObjectIdentity.get(key); - var previous = this.map[id]; - delete this.map[id]; - - return previous; -}; - -/** - * Function: getKeys - * - * Returns all keys as an array. - */ -mxDictionary.prototype.getKeys = function() -{ - var result = []; - - for (var key in this.map) - { - result.push(key); - } - - return result; -}; - -/** - * Function: getValues - * - * Returns all values as an array. - */ -mxDictionary.prototype.getValues = function() -{ - var result = []; - - for (var key in this.map) - { - result.push(this.map[key]); - } - - return result; -}; - -/** - * Function: visit - * - * Visits all entries in the dictionary using the given function with the - * following signature: function(key, value) where key is a string and - * value is an object. - * - * Parameters: - * - * visitor - A function that takes the key and value as arguments. - */ -mxDictionary.prototype.visit = function(visitor) -{ - for (var key in this.map) - { - visitor(key, this.map[key]); - } -}; |