?? redblacksearchtree.html
字號:
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface structure.<A HREF="../structure/Structure.html">Structure</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../structure/Structure.html#elements()">elements</A>, <A HREF="../structure/Structure.html#values()">values</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/RedBlackTree.html">RedBlackTree</A> <B>root</B></PRE><DL><DD>A reference to the root of the tree</DL><HR><A NAME="count"><!-- --></A><H3>count</H3><PRE>protected int <B>count</B></PRE><DL><DD>The number of nodes in the tree</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="RedBlackSearchTree()"><!-- --></A><H3>RedBlackSearchTree</H3><PRE>public <B>RedBlackSearchTree</B>()</PRE><DL><DD>Constructs a red-black search tree with no data</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="isEmpty()"><!-- --></A><H3>isEmpty</H3><PRE>public boolean <B>isEmpty</B>()</PRE><DL><DD>Checks for an empty binary search tree<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../structure/Structure.html#isEmpty()">isEmpty</A></CODE> in interface <CODE><A HREF="../structure/Structure.html">Structure</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../structure/AbstractStructure.html#isEmpty()">isEmpty</A></CODE> in class <CODE><A HREF="../structure/AbstractStructure.html">AbstractStructure</A></CODE></DL></DD><DD><DL><DT><B>Postcondition:</B><DD>Returns true iff the binary search tree is empty<DT><B>Returns:</B><DD>True iff the tree contains no data</DL></DD></DL><HR><A NAME="clear()"><!-- --></A><H3>clear</H3><PRE>public void <B>clear</B>()</PRE><DL><DD>Removes all data from the binary search tree<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../structure/Structure.html#clear()">clear</A></CODE> in interface <CODE><A HREF="../structure/Structure.html">Structure</A></CODE></DL></DD><DD><DL><DT><B>Postcondition:</B><DD>Removes all elements from binary search tree</DL></DD></DL><HR><A NAME="size()"><!-- --></A><H3>size</H3><PRE>public int <B>size</B>()</PRE><DL><DD>Determines the number of data values within the tree<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../structure/Structure.html#size()">size</A></CODE> in interface <CODE><A HREF="../structure/Structure.html">Structure</A></CODE></DL></DD><DD><DL><DT><B>Postcondition:</B><DD>Returns the number of elements in binary search tree<DT><B>Returns:</B><DD>The number of nodes in the binary search tree</DL></DD></DL><HR><A NAME="add(java.lang.Object)"><!-- --></A><H3>add</H3><PRE>public void <B>add</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> value)</PRE><DL><DD>Add a (possibly duplicate) value to the red-black tree, and ensure that the resulting tree is a red-black tree.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../structure/Structure.html#add(java.lang.Object)">add</A></CODE> in interface <CODE><A HREF="../structure/Structure.html">Structure</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>val</CODE> - A reference to non-null object<DT><B>Postcondition:</B><DD>Adds a value to binary search tree</DL></DD></DL><HR><A NAME="remove(java.lang.Object)"><!-- --></A><H3>remove</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> <B>remove</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> value)</PRE><DL><DD>Remove an value "equals to" the indicated value. Only one value is removed, and no guarantee is made concerning which of duplicate values are removed. Value returned is no longer part of the structure<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../structure/Structure.html#remove(java.lang.Object)">remove</A></CODE> in interface <CODE><A HREF="../structure/Structure.html">Structure</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>val</CODE> - Value sought to be removed from tree<DT><B>Postcondition:</B><DD>Removes one instance of val, if found<DT><B>Returns:</B><DD>Value to be removed from tree or null if no value removed</DL></DD></DL><HR><A NAME="contains(java.lang.Object)"><!-- --></A><H3>contains</H3><PRE>public boolean <B>contains</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> value)</PRE><DL><DD>Determines if the red-black search tree contains a value<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../structure/Structure.html#contains(java.lang.Object)">contains</A></CODE> in interface <CODE><A HREF="../structure/Structure.html">Structure</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../structure/AbstractStructure.html#contains(java.lang.Object)">contains</A></CODE> in class <CODE><A HREF="../structure/AbstractStructure.html">AbstractStructure</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>val</CODE> - The value sought. Should be non-null<DT><B>Postcondition:</B><DD>Returns true iff val is a value found within the tree<DT><B>Returns:</B><DD>True iff the tree contains a value "equals to" sought value</DL></DD></DL><HR><A NAME="isRedBlack()"><!-- --></A><H3>isRedBlack</H3><PRE>public boolean <B>isRedBlack</B>()</PRE><DL><DD>Returns true iff this tree is a red-black tree. <font color="#FF0000">WARNING:</font> This method executes in linear time and should not be frequently called during the process of insertion and deletion if the user wants<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>True iff this tree is a red-black tree.</DL></DD></DL><HR><A NAME="iterator()"><!-- --></A><H3>iterator</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Iterator.html">Iterator</A> <B>iterator</B>()</PRE><DL><DD>Returns an iterator over the red-black search tree. Iterator should not be used if tree is modified, as behavior may be unpredicatable Traverses elements using in-order traversal order<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../structure/Structure.html#iterator()">iterator</A></CODE> in interface <CODE><A HREF="../structure/Structure.html">Structure</A></CODE></DL></DD><DD><DL><DT><B>Postcondition:</B><DD>Returns iterator to traverse red-blackST<DT><B>Returns:</B><DD>An iterator over red-black search tree</DL></DD></DL><HR><A NAME="treeString()"><!-- --></A><H3>treeString</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html">String</A> <B>treeString</B>()</PRE><DL><DD>Returns a (possibly long) string representing tree. Differs from <A HREF="../structure/RedBlackSearchTree.html#toString()"><CODE>toString()</CODE></A> in that <A HREF="../structure/RedBlackSearchTree.html#toString()"><CODE>toString()</CODE></A> outputs a single line representation of the contents of the tree. <code>treeString</code>, however, prints out a graphical representations of the tree's <i>structure</i>.<DD><DL></DL></DD><DD><DL><DT><B>Postcondition:</B><DD>Generates a string representation of the AVLST<DT><B>Returns:</B><DD>String representation of tree</DL></DD></DL><HR><A NAME="toString()"><!-- --></A><H3>toString</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html">String</A> <B>toString</B>()</PRE><DL><DD>Returns a string representing tree<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#toString()">toString</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A></CODE></DL></DD><DD><DL><DT><B>Postcondition:</B><DD>Generates a string representation of the AVLST<DT><B>Returns:</B><DD>String representation of tree</DL></DD></DL><HR><A NAME="hashCode()"><!-- --></A><H3>hashCode</H3><PRE>public int <B>hashCode</B>()</PRE><DL><DD>Returns the hashCode of the value stored by this object.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../structure/AbstractStructure.html#hashCode()">hashCode</A></CODE> in class <CODE><A HREF="../structure/AbstractStructure.html">AbstractStructure</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>The hashCode of the value stored by this object.</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/RedBlackIterator.html"><B>PREV CLASS</B></A> <A HREF="../structure/RedBlackTree.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="RedBlackSearchTree.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>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -