?? btinorderiterator.html
字號:
Reset the iterator to its initial state.</TD></TR></TABLE> <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> <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> <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="root"><!-- --></A><H3>root</H3><PRE>protected <A HREF="../structure/BinaryTree.html">BinaryTree</A> <B>root</B></PRE><DL><DD>The root of the subtree being traversed.</DL><HR><A NAME="todo"><!-- --></A><H3>todo</H3><PRE>protected <A HREF="../structure/Stack.html">Stack</A> <B>todo</B></PRE><DL><DD>Stack of nodes that maintain the state of the iterator.</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="BTInorderIterator(structure.BinaryTree)"><!-- --></A><H3>BTInorderIterator</H3><PRE>public <B>BTInorderIterator</B>(<A HREF="../structure/BinaryTree.html">BinaryTree</A> root)</PRE><DL><DD>Construct a new inorder iterator of a tree.<DD><DL><DT><B>Parameters:</B><DD><CODE>root</CODE> - The root of the subtree to be traversed.</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>Reset the iterator to its initial state.<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>Resets the iterator to retraverse</DL></DD></DL><HR><A NAME="hasNext()"><!-- --></A><H3>hasNext</H3><PRE>public boolean <B>hasNext</B>()</PRE><DL><DD>Returns true iff the iterator has more nodes to be considered.<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>Postcondition:</B><DD>Returns true iff iterator is not finished<DT><B>Returns:</B><DD>True iff more nodes are to be considered.</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 node currently being considered.<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>Precondition:</B><DD>hasNext()<DT><B>Postcondition:</B><DD>Returns reference to current value<DT><B>Returns:</B><DD>The node currently under consideration.</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 current node, and increment iterator.<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>Precondition:</B><DD>hasNext()<DT><B>Postcondition:</B><DD>Returns current value, increments iterator<DT><B>Returns:</B><DD>The value of the current node, before iterator iterated.</DL></DD></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> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><a href=../copyright.html target=_top>© 1998-2002 McGraw-Hill</a></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../structure/BitSet.html"><B>PREV CLASS</B></A> <A HREF="../structure/BTLevelorderIterator.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> <A HREF="BTInorderIterator.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR></BODY></HTML>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -