📄 orderedlist.html
字号:
<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> <A NAME="methods_inherited_from_class_structure.Structure"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><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="data"><!-- --></A><H3>data</H3><PRE>protected <A HREF="../structure/SinglyLinkedListElement.html">SinglyLinkedListElement</A> <B>data</B></PRE><DL><DD>Pointer to the smallest element, maintained as a singly linked list</DL><HR><A NAME="count"><!-- --></A><H3>count</H3><PRE>protected int <B>count</B></PRE><DL><DD>Number of elements in list</DL><HR><A NAME="ordering"><!-- --></A><H3>ordering</H3><PRE>protected <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Comparator.html">Comparator</A> <B>ordering</B></PRE><DL><DD>The ordereding used to arange the values</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="OrderedList()"><!-- --></A><H3>OrderedList</H3><PRE>public <B>OrderedList</B>()</PRE><DL><DD>Construct an empty ordered list</DL><HR><A NAME="OrderedList(java.util.Comparator)"><!-- --></A><H3>OrderedList</H3><PRE>public <B>OrderedList</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Comparator.html">Comparator</A> ordering)</PRE><DL><DD>Construct an empty ordered list with alternative ordering<DD><DL><DT><B>Parameters:</B><DD><CODE>ordering</CODE> - the Comparator to be used in comparison</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="clear()"><!-- --></A><H3>clear</H3><PRE>public void <B>clear</B>()</PRE><DL><DD>Remove all the elements from the ordered list<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>the ordered list is empty</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 value to the ordered list, keeping values in order<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>value</CODE> - The value to be added to the list<DT><B>Precondition:</B><DD>value is non-null<DT><B>Postcondition:</B><DD>value is added to the list, leaving it in order</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>Determine if the ordered list 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>value</CODE> - The value sought in the list<DT><B>Precondition:</B><DD>value is a non-null comparable object<DT><B>Postcondition:</B><DD>returns true iff contains value<DT><B>Returns:</B><DD>The actual value found, or null, if not</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 a value from the ordered list. At most one value is removed.<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>value</CODE> - The value to be removed<DT><B>Precondition:</B><DD>value is non-null<DT><B>Postcondition:</B><DD>an instance of value is removed, if in list<DT><B>Returns:</B><DD>The actual value removed from the list</DL></DD></DL><HR><A NAME="size()"><!-- --></A><H3>size</H3><PRE>public int <B>size</B>()</PRE><DL><DD>Determine the number of elements in the list<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>Precondition:</B><DD>returns the number of elements in the ordered list<DT><B>Returns:</B><DD>The number of elements in the list</DL></DD></DL><HR><A NAME="isEmpty()"><!-- --></A><H3>isEmpty</H3><PRE>public boolean <B>isEmpty</B>()</PRE><DL><DD>Determine if the list is empty<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 size is non-zero<DT><B>Returns:</B><DD>True if the ordered list is empty</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>Construct an iterator for traversing elements of ordered list in ascending 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 an iterator over ordered list<DT><B>Returns:</B><DD>An iterator traversing elements in ascending order</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>Generate string representation of the ordered list<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>returns string representation of list<DT><B>Returns:</B><DD>String representing ordered list</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/NaturalComparator.html"><B>PREV CLASS</B></A> <A HREF="../structure/OrderedVector.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="OrderedList.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 + -