⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 swarm.collections.offsets.protocol.html

📁 set for Swarm2.1是圣菲研究院的开发人员对Swarm的特性及其使用描述的最为完备的指南性文档。从这里可以获得最细致的平台说明。
💻 HTML
字号:
<HTML><HEAD><TITLE>Offsets</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="MemberSlot"HREF="swarm.collections.memberslot.protocol.html"><LINKREL="NEXT"TITLE="OrderedSet"HREF="swarm.collections.orderedset.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.memberslot.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.orderedset.protocol.html">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><H1><ANAME="SWARM.COLLECTIONS.OFFSETS.PROTOCOL">Offsets</A></H1><DIVCLASS="REFNAMEDIV"><ANAME="AEN7563"></A><H2>Name</H2>Offsets&nbsp;--&nbsp; Methods for accessing collection members by position.</DIV><DIVCLASS="REFSECT1"><ANAME="AEN7566"></A><H2>Description</H2><P> An offset is an integer value that gives relative position of a member in the enumeration sequence of a collection.  Offsets start the count of the first member at zero, just like C array indexing.</P><P> Offsets provide an alternate means to access the members of a collection, without creating a separate index object.  Some collection subtypes (such as Array) support fast, direct access by integer member offset, while others support member offsets only as a shorthand for sequential access through every preceding member.  Access by offsets is supported on all collections regardless of whether its speed on a particular collection type.</P><P> atOffset: and atOffset:put: raise the error OffsetOutOfRange if the offset is greater than or equal to the count of members in the collection.</P></DIV><DIVCLASS="REFSECT1"><ANAME="AEN7571"></A><H2>Protocols adopted by Offsets</H2><P>None</P></DIV><DIVCLASS="REFSECT1"><ANAME="AEN7574"></A><H2>Methods</H2><DIVCLASS="REFSECT2"><ANAME="AEN7576"></A><H3>Phase: Using</H3><P></P><UL><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.COLLECTIONS.OFFSETS.METHOD.PU.M144"></A><P></P>- <BCLASS="FUNCPROTOTYPE">atOffset:</B> (unsigned)<VARCLASS="PDPARAM">offset</VAR> <BR> Returns the member at a particular member offset.<P></P></DIV></LI><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.COLLECTIONS.OFFSETS.METHOD.PU.M145"></A><P></P>- <BCLASS="FUNCPROTOTYPE">atOffset:</B> (unsigned)<VARCLASS="PDPARAM">offset</VAR> <BCLASS="FUNCPROTOTYPE">put:</B> <VARCLASS="PDPARAM">anObject</VAR> <BR> The atOffset: put: message replaces the member at a particular offset with a new value, and returns the previous member value at this offset.<P></P></DIV></LI><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.COLLECTIONS.OFFSETS.METHOD.PU.M383"></A><P></P>- <BCLASS="FUNCPROTOTYPE">getFirst</B><BR> Equivalent to [aCollection atOffset: 0].<P></P></DIV></LI><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.COLLECTIONS.OFFSETS.METHOD.PU.M410"></A><P></P>- <BCLASS="FUNCPROTOTYPE">getLast</B><BR> Equivalent to [aCollection atOffset: [aCollection getCount] - 1].<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.memberslot.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.orderedset.protocol.html">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">MemberSlot</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="swarm.collections.sgml.reference.html">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">OrderedSet</TD></TR></TABLE></DIV></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -