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

📄 enumerable.html

📁 ajax开发框架prototype中文说明帮助
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<DT><B>返回:</B><DD>Array:返回对象内部每个元素调用其method方法成员执行结果的集合</DL>
</DD>
</DL>
<HR>

<A NAME="max(net.conic.prototype.Iterator)"><!-- --></A><H3>
max</H3>
<PRE>
public <A HREF="../../../net/conic/prototype/Object.html" title="net.conic.prototype 中的类">Object</A> <B>max</B>(<A HREF="../../../net/conic/prototype/Iterator.html" title="net.conic.prototype 中的类">Iterator</A>&nbsp;iterator)</PRE>
<DL>
<DD>返回每次迭代执行的结果的最大值
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>iterator</CODE> - function(value,index){}形式的迭代器
<DT><B>返回:</B><DD>Object:每次迭代执行的结果的最大值</DL>
</DD>
</DL>
<HR>

<A NAME="min(net.conic.prototype.Iterator)"><!-- --></A><H3>
min</H3>
<PRE>
public <A HREF="../../../net/conic/prototype/Object.html" title="net.conic.prototype 中的类">Object</A> <B>min</B>(<A HREF="../../../net/conic/prototype/Iterator.html" title="net.conic.prototype 中的类">Iterator</A>&nbsp;iterator)</PRE>
<DL>
<DD>返回每次迭代执行的结果的最小值
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>iterator</CODE> - function(value,index){}形式的迭代器
<DT><B>返回:</B><DD>Object:每次迭代执行的结果的最小值</DL>
</DD>
</DL>
<HR>

<A NAME="partition(net.conic.prototype.Iterator)"><!-- --></A><H3>
partition</H3>
<PRE>
public <A HREF="../../../net/conic/prototype/Array.html" title="net.conic.prototype 中的类">Array</A> <B>partition</B>(<A HREF="../../../net/conic/prototype/Iterator.html" title="net.conic.prototype 中的类">Iterator</A>&nbsp;iterator)</PRE>
<DL>
<DD>根据判断每次迭代执行的结果ture或false,分别将其元素放入到返回Array中的第一个元素或第二个元素中
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>iterator</CODE> - function(value,index){}形式的迭代器
<DT><B>返回:</B><DD>Array -> [trues,falses]: trues中存放迭代执行结果为ture的元素集合; falses反之;</DL>
</DD>
</DL>
<HR>

<A NAME="pluck(net.conic.prototype.String)"><!-- --></A><H3>
pluck</H3>
<PRE>
public <A HREF="../../../net/conic/prototype/Array.html" title="net.conic.prototype 中的类">Array</A> <B>pluck</B>(<A HREF="../../../net/conic/prototype/String.html" title="net.conic.prototype 中的类">String</A>&nbsp;property)</PRE>
<DL>
<DD>迭代每个元素的property属性(以value[property]方式取得),以数组方式返回
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>property</CODE> - 
<DT><B>返回:</B><DD>Array</DL>
</DD>
</DL>
<HR>

<A NAME="reject(net.conic.prototype.Iterator)"><!-- --></A><H3>
reject</H3>
<PRE>
public <A HREF="../../../net/conic/prototype/Array.html" title="net.conic.prototype 中的类">Array</A> <B>reject</B>(<A HREF="../../../net/conic/prototype/Iterator.html" title="net.conic.prototype 中的类">Iterator</A>&nbsp;iterator)</PRE>
<DL>
<DD>将每次迭代执行的结果false的元素放入到返回Array中返回,相当于取partition的返回的falses成员
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>iterator</CODE> - function(value,index){}形式的迭代器
<DT><B>返回:</B><DD>Array</DL>
</DD>
</DL>
<HR>

<A NAME="sortBy(net.conic.prototype.Iterator)"><!-- --></A><H3>
sortBy</H3>
<PRE>
public <A HREF="../../../net/conic/prototype/Array.html" title="net.conic.prototype 中的类">Array</A> <B>sortBy</B>(<A HREF="../../../net/conic/prototype/Iterator.html" title="net.conic.prototype 中的类">Iterator</A>&nbsp;iterator)</PRE>
<DL>
<DD>根据迭代执行结果的大小顺序,返回元素集合,降序返回。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>iterator</CODE> - function(value,index){}形式的迭代器
<DT><B>返回:</B><DD>Array</DL>
</DD>
</DL>
<HR>

<A NAME="toArray()"><!-- --></A><H3>
toArray</H3>
<PRE>
public <A HREF="../../../net/conic/prototype/Array.html" title="net.conic.prototype 中的类">Array</A> <B>toArray</B>()</PRE>
<DL>
<DD>将迭代的元素集合以数组方式返回
<P>
<DD><DL>

<DT><B>返回:</B><DD>Array</DL>
</DD>
</DL>
<HR>

<A NAME="zip(net.conic.prototype.Object...)"><!-- --></A><H3>
zip</H3>
<PRE>
public <A HREF="../../../net/conic/prototype/Array.html" title="net.conic.prototype 中的类">Array</A> <B>zip</B>(<A HREF="../../../net/conic/prototype/Object.html" title="net.conic.prototype 中的类">Object</A>...&nbsp;arguments)</PRE>
<DL>
<DD><DL>
<DT><B>参数:</B><DD><CODE>arguments</CODE> - 变长参数,一般多为数组类型.需要注意是此方法对最后一个参数如果是function,则将它做为iterator使用,并忽略做为zip的参数之一,具体参照<i>例3</i>
<DT><B>返回:</B><DD>Array <p><b>Example:</b></p>           例1: 调用[1,2,3].zip([4,5,6], [7,8,9]).inspect(); 返回结果 "[ [1,4,7],[2,5,8],[3,6,9] ]"<br>            例2: 调用[1,11,111].zip([2,22,222], [3,33,333]).inspect(); 返回结果 "[ [1,2,3],[11,22,33],[111,222,333] ]"<br>           例3:<pre>                var results = "";                alert([1,2,3].zip([4,5,6],[7,8,9],test).inspect());   //[ [1,4,7],[2,5,8],[3,6,9] ]                 function test(val){ results += "**" + val; }                                    alert(results);   //**1,4,7**2,5,8**3,6,9                   </pre></DL>
</DD>
</DL>
<HR>

<A NAME="inspect()"><!-- --></A><H3>
inspect</H3>
<PRE>
public <A HREF="../../../net/conic/prototype/String.html" title="net.conic.prototype 中的类">String</A> <B>inspect</B>()</PRE>
<DL>
<DD>检测对象内部状态,多用于调试使用
<P>
<DD><DL>

<DT><B>返回:</B><DD>String '#&lt;Enumerable:' + this.toArray().inspect() + '>';</DL>
</DD>
</DL>
<HR>

<A NAME="map(net.conic.prototype.Iterator)"><!-- --></A><H3>
map</H3>
<PRE>
public <A HREF="../../../net/conic/prototype/Array.html" title="net.conic.prototype 中的类">Array</A> <B>map</B>(<A HREF="../../../net/conic/prototype/Iterator.html" title="net.conic.prototype 中的类">Iterator</A>&nbsp;iterator)</PRE>
<DL>
<DD>等同collect()方法
<P>
<DD><DL>
<DT><B>另请参见:</B><DD><A HREF="../../../net/conic/prototype/Enumerable.html#collect(net.conic.prototype.Iterator)"><CODE>collect(Iterator)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="find(net.conic.prototype.Iterator)"><!-- --></A><H3>
find</H3>
<PRE>
public <A HREF="../../../net/conic/prototype/Object.html" title="net.conic.prototype 中的类">Object</A> <B>find</B>(<A HREF="../../../net/conic/prototype/Iterator.html" title="net.conic.prototype 中的类">Iterator</A>&nbsp;iterator)</PRE>
<DL>
<DD>等同于detect()方法
<P>
<DD><DL>
<DT><B>另请参见:</B><DD><A HREF="../../../net/conic/prototype/Enumerable.html#detect(net.conic.prototype.Iterator)"><CODE>detect(Iterator)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="select(net.conic.prototype.Iterator)"><!-- --></A><H3>
select</H3>
<PRE>
public <A HREF="../../../net/conic/prototype/Array.html" title="net.conic.prototype 中的类">Array</A> <B>select</B>(<A HREF="../../../net/conic/prototype/Iterator.html" title="net.conic.prototype 中的类">Iterator</A>&nbsp;iterator)</PRE>
<DL>
<DD>等同于findAll()方法
<P>
<DD><DL>
<DT><B>另请参见:</B><DD><A HREF="../../../net/conic/prototype/Enumerable.html#findAll(net.conic.prototype.Iterator)"><CODE>findAll(Iterator)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="member(net.conic.prototype.Object)"><!-- --></A><H3>
member</H3>
<PRE>
public boolean <B>member</B>(<A HREF="../../../net/conic/prototype/Object.html" title="net.conic.prototype 中的类">Object</A>&nbsp;object)</PRE>
<DL>
<DD>等同于include()方法
<P>
<DD><DL>
<DT><B>另请参见:</B><DD><A HREF="../../../net/conic/prototype/Enumerable.html#include(net.conic.prototype.Object)"><CODE>include(Object)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="entries()"><!-- --></A><H3>
entries</H3>
<PRE>
public <A HREF="../../../net/conic/prototype/Array.html" title="net.conic.prototype 中的类">Array</A> <B>entries</B>()</PRE>
<DL>
<DD>等同于toArray()方法
<P>
<DD><DL>
<DT><B>另请参见:</B><DD><A HREF="../../../net/conic/prototype/Enumerable.html#toArray()"><CODE>toArray()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="_each(net.conic.prototype.IteratorAdapter)"><!-- --></A><H3>
_each</H3>
<PRE>
protected abstract void <B>_each</B>(<A HREF="../../../net/conic/prototype/IteratorAdapter.html" title="net.conic.prototype 中的类">IteratorAdapter</A>&nbsp;each)</PRE>
<DL>
<DD>执行each()方法时内部遍历操作都将执行此方法 ,此方法在prototype的源码中并未在Enumerable对象上做定义 ,在这里用java语言特性定义成protected abstract就是为了重点说明需要继承使用Enumerable特性的JS子类必须实现此方法!
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>each</CODE> - function</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="跳过导航链接"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>概述</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>软件包</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>类</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Enumerable.html"><FONT CLASS="NavBarFont1"><B>使用</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>树</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>已过时</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>索引</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>帮助</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../net/conic/prototype/Date.html" title="net.conic.prototype 中的类"><B>上一个类</B></A>&nbsp;
&nbsp;<A HREF="../../../net/conic/prototype/Event.html" title="net.conic.prototype 中的类"><B>下一个类</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html?net/conic/prototype/Enumerable.html" target="_top"><B>框架</B></A>  &nbsp;
&nbsp;<A HREF="Enumerable.html" target="_top"><B>无框架</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>所有类</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../allclasses-noframe.html"><B>所有类</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  摘要:&nbsp;嵌套&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_net.conic.prototype.Object">字段</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">构造函数</A>&nbsp;|&nbsp;<A HREF="#method_summary">方法</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
详细信息:&nbsp;字段&nbsp;|&nbsp;<A HREF="#constructor_detail">构造函数</A>&nbsp;|&nbsp;<A HREF="#method_detail">方法</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>

</BODY>
</HTML>

⌨️ 快捷键说明

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