📄 reversecomparator.html
字号:
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../structure/ReverseComparator.html#compare(java.lang.Object, java.lang.Object)">compare</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> a, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> b)</CODE><BR> Compare two values, a and b.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../structure/ReverseComparator.html#equals(java.lang.Object)">equals</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> b)</CODE><BR> Returns true if the other object is a NaturalComparator.</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#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="base"><!-- --></A><H3>base</H3><PRE>protected <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Comparator.html">Comparator</A> <B>base</B></PRE><DL></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="ReverseComparator()"><!-- --></A><H3>ReverseComparator</H3><PRE>public <B>ReverseComparator</B>()</PRE><DL><DD>Construct a comparator that generates reverse natural comparison</DL><HR><A NAME="ReverseComparator(java.util.Comparator)"><!-- --></A><H3>ReverseComparator</H3><PRE>public <B>ReverseComparator</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Comparator.html">Comparator</A> base)</PRE><DL><DD>Construct a comparator that generates reverse of another comparator<DD><DL><DT><B>Parameters:</B><DD><CODE>base</CODE> - the ordering to be reversed</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="compare(java.lang.Object, java.lang.Object)"><!-- --></A><H3>compare</H3><PRE>public int <B>compare</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> a, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> b)</PRE><DL><DD>Compare two values, a and b. Simply calls the default compareTo method for a on b.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Comparator.html#compare(java.lang.Object, java.lang.Object)">compare</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Comparator.html">Comparator</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>a</CODE> - object performing the compare<DD><CODE>b</CODE> - the object being compared<DT><B>Precondition:</B><DD>a, b non-null, and b is of type of a<DT><B>Postcondition:</B><DD>returns value <, ==, > 0 if a <, ==, > b<DT><B>Returns:</B><DD>value <, ==, > 0 if a <, ==, > b using a.compareTo</DL></DD></DL><HR><A NAME="equals(java.lang.Object)"><!-- --></A><H3>equals</H3><PRE>public boolean <B>equals</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> b)</PRE><DL><DD>Returns true if the other object is a NaturalComparator.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Comparator.html#equals(java.lang.Object)">equals</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Comparator.html">Comparator</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#equals(java.lang.Object)">equals</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>Parameters:</B><DD><CODE>b</CODE> - a possible NaturalComparator<DT><B>Postcondition:</B><DD>returns true if b is a NaturalComparator<DT><B>Returns:</B><DD>true if b is a NaturalComparator</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/RedBlackTree.html"><B>PREV CLASS</B></A> <A HREF="../structure/SetList.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="ReverseComparator.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 + -