?? binarytree.html
字號:
<CODE> <A HREF="../structure/AbstractIterator.html">AbstractIterator</A></CODE></FONT></TD><TD><CODE><B><A HREF="../structure/BinaryTree.html#preorderIterator()">preorderIterator</A></B>()</CODE><BR> Return an iterator to traverse nodes of subtree in-order</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../structure/BinaryTree.html">BinaryTree</A></CODE></FONT></TD><TD><CODE><B><A HREF="../structure/BinaryTree.html#right()">right</A></B>()</CODE><BR> Get right subtree of current node</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../structure/BinaryTree.html">BinaryTree</A></CODE></FONT></TD><TD><CODE><B><A HREF="../structure/BinaryTree.html#root()">root</A></B>()</CODE><BR> Returns reference to root of tree containing n</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../structure/BinaryTree.html#rotateLeft()">rotateLeft</A></B>()</CODE><BR> Method to perform a left rotation of tree about this node Node must have a right child.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../structure/BinaryTree.html#rotateRight()">rotateRight</A></B>()</CODE><BR> Method to perform a right rotation of tree about this node Node must have a left child.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../structure/BinaryTree.html#setLeft(structure.BinaryTree)">setLeft</A></B>(<A HREF="../structure/BinaryTree.html">BinaryTree</A> newLeft)</CODE><BR> Update the left subtree of this node.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../structure/BinaryTree.html#setParent(structure.BinaryTree)">setParent</A></B>(<A HREF="../structure/BinaryTree.html">BinaryTree</A> newParent)</CODE><BR> Update the parent of this node</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../structure/BinaryTree.html#setRight(structure.BinaryTree)">setRight</A></B>(<A HREF="../structure/BinaryTree.html">BinaryTree</A> newRight)</CODE><BR> Update the right subtree of this node.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../structure/BinaryTree.html#setValue(java.lang.Object)">setValue</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> value)</CODE><BR> Set's value associated with this node</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../structure/BinaryTree.html#size()">size</A></B>()</CODE><BR> Returns the number of descendants of node</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../structure/BinaryTree.html#toString()">toString</A></B>()</CODE><BR> Returns a representation the subtree rooted at this node</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../structure/BinaryTree.html#treeString()">treeString</A></B>()</CODE><BR> Returns a string representing the tree rooted at this node.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../structure/BinaryTree.html#value()">value</A></B>()</CODE><BR> Returns value associated with this node</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#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#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="val"><!-- --></A><H3>val</H3><PRE>protected <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> <B>val</B></PRE><DL><DD>The value associated with this node</DL><HR><A NAME="parent"><!-- --></A><H3>parent</H3><PRE>protected <A HREF="../structure/BinaryTree.html">BinaryTree</A> <B>parent</B></PRE><DL><DD>The parent of this node</DL><HR><A NAME="left"><!-- --></A><H3>left</H3><PRE>protected <A HREF="../structure/BinaryTree.html">BinaryTree</A> <B>left</B></PRE><DL><DD>The left child of this node, or EMPTY</DL><HR><A NAME="right"><!-- --></A><H3>right</H3><PRE>protected <A HREF="../structure/BinaryTree.html">BinaryTree</A> <B>right</B></PRE><DL><DD>The left child of this node, or EMPTY</DL><HR><A NAME="EMPTY"><!-- --></A><H3>EMPTY</H3><PRE>public static final <A HREF="../structure/BinaryTree.html">BinaryTree</A> <B>EMPTY</B></PRE><DL><DD>The unique empty node</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="BinaryTree()"><!-- --></A><H3>BinaryTree</H3><PRE>private <B>BinaryTree</B>()</PRE><DL><DD>A one-time constructor, for constructing empty trees.</DL><HR><A NAME="BinaryTree(java.lang.Object)"><!-- --></A><H3>BinaryTree</H3><PRE>public <B>BinaryTree</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> value)</PRE><DL><DD>Constructs a tree node with no children. Value of the node is provided by the user<DD><DL><DT><B>Parameters:</B><DD><CODE>value</CODE> - A (possibly null) value to be referenced by node</DL></DD></DL><HR><A NAME="BinaryTree(java.lang.Object, structure.BinaryTree, structure.BinaryTree)"><!-- --></A><H3>BinaryTree</H3><PRE>public <B>BinaryTree</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> value, <A HREF="../structure/BinaryTree.html">BinaryTree</A> left, <A HREF="../structure/BinaryTree.html">BinaryTree</A> right)</PRE><DL><DD>Constructs a tree node with no children. Value of the node and subtrees are provided by the user<DD><DL><DT><B>Parameters:</B><DD><CODE>value</CODE> - A (possibly null) value to be referenced by node<DD><CODE>left</CODE> - The subtree to be left subtree of node<DD><CODE>right</CODE> - The subtree to be right subtree of node</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="left()"><!-- --></A><H3>left</H3><PRE>public <A HREF="../structure/BinaryTree.html">BinaryTree</A> <B>left</B>()</PRE><DL><DD>Get left subtree of current node<DD><DL><DT><B>Postcondition:</B><DD>Returns reference to left subtree, or null<DT><B>Returns:</B><DD>The left subtree of this node</DL></DD></DL><HR><A NAME="right()"><!-- --></A><H3>right</H3><PRE>public <A HREF="../structure/BinaryTree.html">BinaryTree</A> <B>right</B>()</PRE><DL><DD>Get right subtree of current node<DD><DL><DT><B>Postcondition:</B><DD>Returns reference to right subtree, or null<DT><B>Returns:</B><DD>The right subtree of this node</DL></DD></DL><HR><A NAME="parent()"><!-- --></A><H3>parent</H3><PRE>public <A HREF="../structure/BinaryTree.html">BinaryTree</A> <B>parent</B>()</PRE><DL><DD>Get reference to parent of this node<DD><DL><DT><B>Postcondition:</B><DD>Returns reference to parent node, or null<DT><B>Returns:</B><DD>Reference to parent of this node</DL></DD></DL><HR><A NAME="setLeft(structure.BinaryTree)"><!-- --></A><H3>setLeft</H3><PRE>public void <B>setLeft</B>(<A HREF="../structure/BinaryTree.html">BinaryTree</A> newLeft)</PRE><DL><DD>Update the left subtree of this node. Parent of the left subtree is updated consistently. Existing subtree is detached<DD><DL><DT><B>Parameters:</B><DD><CODE>newLeft</CODE> - The root of the new left subtree<DT><B>Postcondition:</B><DD>Sets left subtree to newLeft re-parents newLeft if not null</DL></DD></DL><HR><A NAME="setRight(structure.BinaryTree)"><!-- --></A><H3>setRight</H3><PRE>public void <B>setRight</B>(<A HREF="../structure/BinaryTree.html">BinaryTree</A> newRight)</PRE><DL><DD>Update the right subtree of this node. Parent of the right subtree is updated consistently. Existing subtree is detached<DD><DL><DT><B>Parameters:</B><DD><CODE>newRight</CODE> - A reference to the new right subtree of this node<DT><B>Postcondition:</B><DD>Sets left subtree to newRight re-parents newRight if not null</DL></DD></DL><HR><A NAME="setParent(structure.BinaryTree)"><!-- --></A><H3>setParent</H3><PRE>protected void <B>setParent</B>(<A HREF="../structure/BinaryTree.html">BinaryTree</A> newParent)</PRE><DL><DD>Update the parent of this node<DD><DL><DT><B>Parameters:</B><DD><CODE>newParent</CODE> - A reference to the new parent of this node<DT><B>Postcondition:</B><DD>Re-parents this node to parent reference, or null</DL></DD></DL><HR><A NAME="size()"><!-- --></A><H3>size</H3><PRE>public int <B>size</B>()</PRE><DL><DD>Returns the number of descendants of node<DD><DL><DT><B>Postcondition:</B><DD>Returns the size of the subtree<DT><B>Returns:</B><DD>Size of subtree</DL></DD></DL><HR><A NAME="root()"><!-- --></A><H3>root</H3><PRE>public <A HREF="../structure/BinaryTree.html">BinaryTree</A> <B>root</B>()</PRE><DL><DD>Returns reference to root of tree containing n<DD><DL>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -