⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sortedset.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 2 页
字号:
comparator</H3><PRE>public <A HREF="../../java/util/Comparator.html">Comparator</A> <B>comparator</B>()</PRE><DL><DD>Returns the comparator associated with this sorted set, or <tt>null</tt> if it uses its elements' natural ordering.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the comparator associated with this sorted set, or 	       <tt>null</tt> if it uses its elements' natural ordering.</DL></DD></DL><HR><A NAME="subSet(java.lang.Object, java.lang.Object)"><!-- --></A><H3>subSet</H3><PRE>public <A HREF="../../java/util/SortedSet.html">SortedSet</A> <B>subSet</B>(<A HREF="../../java/lang/Object.html">Object</A>&nbsp;fromElement,                        <A HREF="../../java/lang/Object.html">Object</A>&nbsp;toElement)</PRE><DL><DD>Returns a view of the portion of this sorted set whose elements range from <tt>fromElement</tt>, inclusive, to <tt>toElement</tt>, exclusive. (If <tt>fromElement</tt> and <tt>toElement</tt> are equal, the returned sorted set is empty.)  The returned sorted set is backed by this sorted set, so changes in the returned sorted set are reflected in this sorted set, and vice-versa.  The returned sorted set supports all optional set operations that this sorted set supports.<p> The sorted set returned by this method will throw an <tt>IllegalArgumentException</tt> if the user attempts to insert a element outside the specified range.<p>  Note: this method always returns a <i>half-open range</i> (which includes its low endpoint but not its high endpoint).  If you need a <i>closed range</i> (which includes both endpoints), and the element type allows for calculation of the successor a given value, merely request the subrange from <tt>lowEndpoint</tt> to <tt>successor(highEndpoint)</tt>.  For example, suppose that <tt>s</tt> is a sorted set of strings.  The following idiom obtains a view containing all of the strings in <tt>s</tt> from <tt>low</tt> to <tt>high</tt>, inclusive: <pre> SortedSet sub = s.subSet(low, high+"\0"); </pre>  A similar technique can be used to generate an <i>open range</i> (which contains neither endpoint).  The following idiom obtains a view containing all of the Strings in <tt>s</tt> from <tt>low</tt> to <tt>high</tt>, exclusive: <pre> SortedSet sub = s.subSet(low+"\0", high); </pre><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>fromElement</CODE> - low endpoint (inclusive) of the subSet.<DD><CODE>toElement</CODE> - high endpoint (exclusive) of the subSet.<DT><B>Returns:</B><DD>a view of the specified range within this sorted set.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/ClassCastException.html">ClassCastException</A></CODE> - if <tt>fromElement</tt> and         <tt>toElement</tt> cannot be compared to one another using this         set's comparator (or, if the set has no comparator, using         natural ordering).  Implementations may, but are not required	       to, throw this exception if <tt>fromElement</tt> or         <tt>toElement</tt> cannot be compared to elements currently in         the set.<DD><CODE><A HREF="../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if <tt>fromElement</tt> is greater than         <tt>toElement</tt>; or if this set is itself a subSet, headSet,         or tailSet, and <tt>fromElement</tt> or <tt>toElement</tt> are         not within the specified range of the subSet, headSet, or         tailSet.<DD><CODE><A HREF="../../java/lang/NullPointerException.html">NullPointerException</A></CODE> - if <tt>fromElement</tt> or	       <tt>toElement</tt> is <tt>null</tt> and this sorted set does	       not tolerate <tt>null</tt> elements.</DL></DD></DL><HR><A NAME="headSet(java.lang.Object)"><!-- --></A><H3>headSet</H3><PRE>public <A HREF="../../java/util/SortedSet.html">SortedSet</A> <B>headSet</B>(<A HREF="../../java/lang/Object.html">Object</A>&nbsp;toElement)</PRE><DL><DD>Returns a view of the portion of this sorted set whose elements are strictly less than <tt>toElement</tt>.  The returned sorted set is backed by this sorted set, so changes in the returned sorted set are reflected in this sorted set, and vice-versa.  The returned sorted set supports all optional set operations.<p> The sorted set returned by this method will throw an <tt>IllegalArgumentException</tt> if the user attempts to insert a element outside the specified range.<p> Note: this method always returns a view that does not contain its (high) endpoint.  If you need a view that does contain this endpoint, and the element type allows for calculation of the successor a given value, merely request a headSet bounded by <tt>successor(highEndpoint)</tt>.  For example, suppose that <tt>s</tt> is a sorted set of strings.  The following idiom obtains a view containing all of the strings in <tt>s</tt> that are less than or equal to <tt>high</tt>: 	    <pre>    SortedSet head = s.headSet(high+"\0");</pre><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>toElement</CODE> - high endpoint (exclusive) of the headSet.<DT><B>Returns:</B><DD>a view of the specified initial range of this sorted set.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/ClassCastException.html">ClassCastException</A></CODE> - if <tt>toElement</tt> is not compatible         with this set's comparator (or, if the set has no comparator,         if <tt>toElement</tt> does not implement <tt>Comparable</tt>).         Implementations may, but are not required to, throw this	       exception if <tt>toElement</tt> cannot be compared to elements         currently in the set.<DD><CODE><A HREF="../../java/lang/NullPointerException.html">NullPointerException</A></CODE> - if <tt>toElement</tt> is <tt>null</tt> and	       this sorted set does not tolerate <tt>null</tt> elements.<DD><CODE><A HREF="../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if this set is itself a subSet,         headSet, or tailSet, and <tt>toElement</tt> is not within the         specified range of the subSet, headSet, or tailSet.</DL></DD></DL><HR><A NAME="tailSet(java.lang.Object)"><!-- --></A><H3>tailSet</H3><PRE>public <A HREF="../../java/util/SortedSet.html">SortedSet</A> <B>tailSet</B>(<A HREF="../../java/lang/Object.html">Object</A>&nbsp;fromElement)</PRE><DL><DD>Returns a view of the portion of this sorted set whose elements are greater than or equal to <tt>fromElement</tt>.  The returned sorted set is backed by this sorted set, so changes in the returned sorted set are reflected in this sorted set, and vice-versa.  The returned sorted set supports all optional set operations.<p> The sorted set returned by this method will throw an <tt>IllegalArgumentException</tt> if the user attempts to insert a element outside the specified range.<p> Note: this method always returns a view that contains its (low) endpoint.  If you need a view that does not contain this endpoint, and the element type allows for calculation of the successor a given value, merely request a tailSet bounded by <tt>successor(lowEndpoint)</tt>. For example, suppose that <tt>s</tt> is a sorted set of strings.  The following idiom obtains a view containing all of the strings in <tt>s</tt> that are strictly greater than <tt>low</tt>:  	    <pre>    SortedSet tail = s.tailSet(low+"\0");</pre><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>fromElement</CODE> - low endpoint (inclusive) of the tailSet.<DT><B>Returns:</B><DD>a view of the specified final range of this sorted set.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/ClassCastException.html">ClassCastException</A></CODE> - if <tt>fromElement</tt> is not compatible         with this set's comparator (or, if the set has no comparator,         if <tt>fromElement</tt> does not implement <tt>Comparable</tt>).         Implementations may, but are not required to, throw this	       exception if <tt>fromElement</tt> cannot be compared to elements         currently in the set.<DD><CODE><A HREF="../../java/lang/NullPointerException.html">NullPointerException</A></CODE> - if <tt>fromElement</tt> is <tt>null</tt>	       and this sorted set does not tolerate <tt>null</tt> elements.<DD><CODE><A HREF="../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if this set is itself a subSet,         headSet, or tailSet, and <tt>fromElement</tt> is not within the         specified range of the subSet, headSet, or tailSet.</DL></DD></DL><HR><A NAME="first()"><!-- --></A><H3>first</H3><PRE>public <A HREF="../../java/lang/Object.html">Object</A> <B>first</B>()</PRE><DL><DD>Returns the first (lowest) element currently in this sorted set.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the first (lowest) element currently in this sorted set.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/util/NoSuchElementException.html">NoSuchElementException</A></CODE> - sorted set is empty.</DL></DD></DL><HR><A NAME="last()"><!-- --></A><H3>last</H3><PRE>public <A HREF="../../java/lang/Object.html">Object</A> <B>last</B>()</PRE><DL><DD>Returns the last (highest) element currently in this sorted set.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the last (highest) element currently in this sorted set.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/util/NoSuchElementException.html">NoSuchElementException</A></CODE> - sorted set is empty.</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="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/SortedSet.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Std.&nbsp;Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../java/util/SortedMap.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="SortedSet.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://java.sun.com/products/jdk/1.3/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation  contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road<br>Palo Alto, California, 94303, U.S.A.  All Rights Reserved.</font></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -