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

📄 arrayiterator.html

📁 学习JAVA的很好的JAVA包和文档包
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../structure/ArrayIterator.html#reset()">reset</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the iteration to the original state specified by the  constructor.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_structure.AbstractIterator"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class structure.<A HREF="../structure/AbstractIterator.html">AbstractIterator</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../structure/AbstractIterator.html#hasMoreElements()">hasMoreElements</A>, <A HREF="../structure/AbstractIterator.html#nextElement()">nextElement</A>, <A HREF="../structure/AbstractIterator.html#remove()">remove</A>, <A HREF="../structure/AbstractIterator.html#value()">value</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#<clinit>()"><clinit></A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#clone()">clone</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#finalize()">finalize</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#getClass()">getClass</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notify()">notify</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#registerNatives()">registerNatives</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#toString()">toString</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait()">wait</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait(long)">wait</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait(long, int)">wait</A></CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="data"><!-- --></A><H3>data</H3><PRE>protected <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A>[] <B>data</B></PRE><DL><DD>The array over which this iterator iterates</DL><HR><A NAME="head"><!-- --></A><H3>head</H3><PRE>protected int <B>head</B></PRE><DL><DD>The index of the first item in the iteration</DL><HR><A NAME="count"><!-- --></A><H3>count</H3><PRE>protected int <B>count</B></PRE><DL><DD>The number of elements in the array over which to iterate</DL><HR><A NAME="current"><!-- --></A><H3>current</H3><PRE>protected int <B>current</B></PRE><DL><DD>The current item in the iteration</DL><HR><A NAME="remaining"><!-- --></A><H3>remaining</H3><PRE>protected int <B>remaining</B></PRE><DL><DD>The number of items remaining in the itearation</DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="ArrayIterator(java.lang.Object[])"><!-- --></A><H3>ArrayIterator</H3><PRE>public <B>ArrayIterator</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A>[]&nbsp;source)</PRE><DL><DD>Construct an iterator that iterates over the entire contents   of an array.<DD><DL><DT><B>Parameters:</B><DD><CODE>source</CODE> - The array over which to iterate.</DL></DD></DL><HR><A NAME="ArrayIterator(java.lang.Object[], int, int)"><!-- --></A><H3>ArrayIterator</H3><PRE>public <B>ArrayIterator</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A>[]&nbsp;source,                     int&nbsp;first,                     int&nbsp;size)</PRE><DL><DD>Constructs an iterator that will iterate over a specified portion of the source array.<DD><DL><DT><B>Parameters:</B><DD><CODE>source</CODE> - The array over which to iterate.<DD><CODE>first</CODE> - The index at which we will start our iteration.<DD><CODE>size</CODE> - The number of elements following that start index         that are to be iterated over.</DL></DD></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="reset()"><!-- --></A><H3>reset</H3><PRE>public void <B>reset</B>()</PRE><DL><DD>Return the iteration to the original state specified by the  constructor.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../structure/AbstractIterator.html#reset()">reset</A></CODE> in class <CODE><A HREF="../structure/AbstractIterator.html">AbstractIterator</A></CODE></DL></DD><DD><DL><DT><B>Postcondition:</B><DD>The iteration is returned to its original state.</DL></DD></DL><HR><A NAME="hasNext()"><!-- --></A><H3>hasNext</H3><PRE>public boolean <B>hasNext</B>()</PRE><DL><DD>Returns true iff there are elements specified by our iterator that have not been visited by the current iteration.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../structure/AbstractIterator.html#hasNext()">hasNext</A></CODE> in class <CODE><A HREF="../structure/AbstractIterator.html">AbstractIterator</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>True iff there are elements specified by our iterator that have not been visited by the current iteration.</DL></DD></DL><HR><A NAME="next()"><!-- --></A><H3>next</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> <B>next</B>()</PRE><DL><DD>Return the next object in our iteration and advance the iterator to the next object in the iteration.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../structure/AbstractIterator.html#next()">next</A></CODE> in class <CODE><A HREF="../structure/AbstractIterator.html">AbstractIterator</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>The next object in our iteration.</DL></DD></DL><HR><A NAME="get()"><!-- --></A><H3>get</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> <B>get</B>()</PRE><DL><DD>Return the object currently specified by the iteration without advancing the iterator to the next object.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../structure/AbstractIterator.html#get()">get</A></CODE> in class <CODE><A HREF="../structure/AbstractIterator.html">AbstractIterator</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>The next object in our iteration.</DL></DD></DL><HR><A NAME="main(java.lang.String[])"><!-- --></A><H3>main</H3><PRE>public static void <B>main</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html">String</A>[]&nbsp;argv)</PRE><DL><DD>test code to prove that iterators are slower than for loops</DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><a href=../copyright.html target=_top>&copy; 1998-2002 McGraw-Hill</a></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../structure/AppendableList.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../structure/Assert.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="ArrayIterator.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR></BODY></HTML>

⌨️ 快捷键说明

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