<!-- saved from url=(0026)http://www.naturaldocs.org -->
<divid=Content><divclass="CClass"><divclass=CTopicid=MainTopic><h1class=CTitle><aname="mxDictionary"></a>mxDictionary</h1><divclass=CBody><p>A wrapper class for an associative array with object keys. Note: This implementation uses <mxObjectIdentitiy> to turn object keys into strings.</p><!--START_ND_SUMMARY--><divclass=Summary><divclass=STitle>Summary</div><divclass=SBorder><tableborder=0cellspacing=0cellpadding=0class=STable><trclass="SMain"><tdclass=SEntry><ahref="#mxDictionary">mxDictionary</a></td><tdclass=SDescription>A wrapper class for an associative array with object keys. </td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxDictionary.Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxDictionary.mxEventSource">mxEventSource</a></td><tdclass=SDescription>Constructs a new dictionary which allows object to be used as keys.</td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#mxDictionary.map">map</a></td><tdclass=SDescription>Stores the (key, value) pairs in this dictionary.</td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxDictionary.clear"id=link1onMouseOver="ShowTip(event, 'tt1', 'link1')"onMouseOut="HideTip('tt1')">clear</a></td><tdclass=SDescription>Clears the dictionary.</td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#mxDictionary.get"id=link2onMouseOver="ShowTip(event, 'tt2', 'link2')"onMouseOut="HideTip('tt2')">get</a></td><tdclass=SDescription>Returns the value for the given key.</td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxDictionary.put"id=link3onMouseOver="ShowTip(event, 'tt3', 'link3')"onMouseOut="HideTip('tt3')">put</a></td><tdclass=SDescription>Stores the value under the given key and returns the previous value for that key.</td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#mxDictionary.remove"id=link4onMouseOver="ShowTip(event, 'tt4', 'link4')"onMouseOut="HideTip('tt4')">remove</a></td><tdclass=SDescription>Removes the value for the given key and returns the value that has been removed.</td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxDictionary.getKeys"id=link5onMouseOver="ShowTip(event, 'tt5', 'link5')"onMouseOut="HideTip('tt5')">getKeys</a></td><tdclass=SDescription>Returns all keys as an array.</td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#mxDictionary.getValues"id=link6onMouseOver="ShowTip(event, 'tt6', 'link6')"onMouseOut="HideTip('tt6')">getValues</a></td><tdclass=SDescription>Returns all values as an array.</td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxDictionary.visit"id=link7onMouseOver="ShowTip(event, 'tt7', 'link7')"onMouseOut="HideTip('tt7')">visit</a></td><tdclass=SDescription>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.</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDictionary.mxEventSource"></a>mxEventSource</h3><divclass=CBody><p>Constructs a new dictionary which allows object to be used as keys.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDictionary.map"></a>map</h3><divclass=CBody><p>Stores the (key, value) pairs in this dictionary.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDictionary.clear"></a>clear</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxDictionary.prototype.clear = function()</td></tr></table></blockquote><p>Clears the dictionary.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDictionary.get"></a>get</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxDictionary.prototype.get = function(</td><tdclass="PParameter prettyprint "nowrap>key</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the value for the given key.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDictionary.put"></a>put</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxDictionary.prototype.put = function(</td><tdclass="PParameter prettyprint "nowrap>key,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>value</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Stores the value under the given key and returns the previous value for that key.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDictionary.remove"></a>remove</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxDictionary.prototype.remove = function(</td><tdclass="PParameter prettyprint "nowrap>key</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Removes the value for the given key and returns the value that has been removed.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDictionary.getKeys"></a>getKeys</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxDictionary.prototype.getKeys = function()</td></tr></table></blockquote><p>Returns all keys as an array.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDictionary.getValues"></a>getValues</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxDictionary.prototype.getValues = function()</td></tr></table></blockquote><p>Returns all values as an array.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDictionary.visit"></a>visit</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxDictionary.prototype.visit = function(</td><tdclass="PParameter prettyprint "nowrap>visitor</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>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.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>visitor</td><tdclass=CDLDescription>A function that takes the key and value as arguments.</td></tr></table></div></div></div>
<divclass=CToolTipid="tt1"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxDictionary.prototype.clear = function()</td></tr></table></blockquote>Clears the dictionary.</div></div><divclass=CToolTipid="tt2"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxDictionary.prototype.get = function(</td><tdclass="PParameter prettyprint "nowrap>key</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Returns the value for the given key.</div></div><divclass=CToolTipid="tt3"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxDictionary.prototype.put = function(</td><tdclass="PParameter prettyprint "nowrap>key,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>value</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Stores the value under the given key and returns the previous value for that key.</div></div><divclass=CToolTipid="tt4"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxDictionary.prototype.remove = function(</td><tdclass="PParameter prettyprint "nowrap>key</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Removes the value for the given key and returns the value that has been removed.</div></div><divclass=CToolTipid="tt5"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxDictionary.prototype.getKeys = function()</td></tr></table></blockquote>Returns all keys as an array.</div></div><divclass=CToolTipid="tt6"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxDictionary.prototype.getValues = function()</td></tr></table></blockquote>Returns all values as an array.</div></div><divclass=CToolTipid="tt7"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxDictionary.prototype.visit = function(</td><tdclass="PParameter prettyprint "nowrap>visitor</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>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.</div></div><!--END_ND_TOOLTIPS-->