swarm.collections.map.protocol.html
来自「set for Swarm2.1是圣菲研究院的开发人员对Swarm的特性及其使用」· HTML 代码 · 共 256 行
HTML
256 行
<HTML><HEAD><TITLE>Map</TITLE><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.53"><LINKREL="HOME"TITLE="Documentation Set for Swarm 2.1.1"HREF="set.html"><LINKREL="UP"TITLE="Collections Library"HREF="swarm.collections.sgml.reference.html"><LINKREL="PREVIOUS"TITLE="ListShuffler"HREF="swarm.collections.listshuffler.protocol.html"><LINKREL="NEXT"TITLE="MapIndex"HREF="swarm.collections.mapindex.protocol.html"></HEAD><BODYCLASS="REFENTRY"BGCOLOR="#FFFFFF"TEXT="#000000"LINK="#0000FF"VLINK="#840084"ALINK="#0000FF"><DIVCLASS="NAVHEADER"><TABLEWIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">Documentation Set for Swarm 2.1.1</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="swarm.collections.listshuffler.protocol.html">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom">Reference II. Collections Library</TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="swarm.collections.mapindex.protocol.html">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><H1><ANAME="SWARM.COLLECTIONS.MAP.PROTOCOL">Map</A></H1><DIVCLASS="REFNAMEDIV"><ANAME="AEN7359"></A><H2>Name</H2>Map -- Collection of associations from key objects to member objects.</DIV><DIVCLASS="REFSECT1"><ANAME="AEN7362"></A><H2>Description</H2><P> Map is a subtype of KeyedCollection in which the key value associated with each member is independent of the member itself. Whenever a new member is added to the collection, a key value to be associated with the member must be supplied also. A Map defines a mapping from key values to member values.</P><P> For the Map type, key values are independent of the member values with which they are associated. Map defines two additional options to document information about its key values. Map also defines its own messages to distinguish the key value from member value in any operation which involves both.</P></DIV><DIVCLASS="REFSECT1"><ANAME="AEN7366"></A><H2>Protocols adopted by Map</H2><P> <AHREF="swarm.collections.keyedcollection.protocol.html">KeyedCollection</A> <AHREF="swarm.collections.comparefunction.protocol.html">CompareFunction</A> <AHREF="swarm.defobj.creatable.protocol.html">CREATABLE</A></P></DIV><DIVCLASS="REFSECT1"><ANAME="AEN7372"></A><H2>Methods</H2><DIVCLASS="REFSECT2"><ANAME="AEN7374"></A><H3>Phase: Using</H3><P></P><UL><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.COLLECTIONS.MAP.METHOD.PU.M141"></A><P></P>- (BOOL)<BCLASS="FUNCPROTOTYPE">at:</B> <VARCLASS="PDPARAM">aKey</VAR> <BCLASS="FUNCPROTOTYPE">insert:</B> <VARCLASS="PDPARAM">anObject</VAR> <BR> at:insert: inserts an entry into a Map containing the key and member values given as its arguments. It returns true if the key was not previously contained in the collection. An attempt to insert a duplicate key is simply rejected and false is returned.<P></P></DIV></LI><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.COLLECTIONS.MAP.METHOD.PU.M143"></A><P></P>- <BCLASS="FUNCPROTOTYPE">at:</B> <VARCLASS="PDPARAM">aKey</VAR> <BCLASS="FUNCPROTOTYPE">replace:</B> <VARCLASS="PDPARAM">anObject</VAR> <BR> Replaces an existing member value associated with a key value by a new value given as its final argument. The message returns the member value which was formerly associated with the key value.<P></P></DIV></LI><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.COLLECTIONS.MAP.METHOD.PU.M581"></A><P></P>- (id <MapIndex>)<BCLASS="FUNCPROTOTYPE">mapBegin:</B> (id <Zone>)<VARCLASS="PDPARAM">aZone</VAR> <BR> Returns a MapIndex, the special index for the Map type<P></P></DIV></LI></UL></DIV></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLEWIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="swarm.collections.listshuffler.protocol.html">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="set.html">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="swarm.collections.mapindex.protocol.html">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">ListShuffler</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="swarm.collections.sgml.reference.html">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">MapIndex</TD></TR></TABLE></DIV></BODY></HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?