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

📄 treemap.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 4 页
字号:
 <tt>Iterator.remove</tt>, <tt>Set.remove</tt>, <tt>removeAll</tt>, <tt>retainAll</tt>, and <tt>clear</tt> operations.  It does not support the <tt>add</tt> or <tt>addAll</tt> operations.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../java/util/Map.html#keySet()">keySet</A></CODE> in interface <CODE><A HREF="../../java/util/Map.html">Map</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/util/AbstractMap.html#keySet()">keySet</A></CODE> in class <CODE><A HREF="../../java/util/AbstractMap.html">AbstractMap</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>a set view of the keys contained in this TreeMap.</DL></DD></DL><HR><A NAME="values()"><!-- --></A><H3>values</H3><PRE>public <A HREF="../../java/util/Collection.html">Collection</A> <B>values</B>()</PRE><DL><DD>Returns a collection view of the values contained in this map.  The collection's iterator will return the values in the order that their corresponding keys appear in the tree.  The collection is backed by this <tt>TreeMap</tt> instance, so changes to this map are reflected in the collection, and vice-versa.  The collection supports element removal, which removes the corresponding mapping from the map through the <tt>Iterator.remove</tt>, <tt>Collection.remove</tt>, <tt>removeAll</tt>, <tt>retainAll</tt>, and <tt>clear</tt> operations. It does not support the <tt>add</tt> or <tt>addAll</tt> operations.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../java/util/Map.html#values()">values</A></CODE> in interface <CODE><A HREF="../../java/util/Map.html">Map</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/util/AbstractMap.html#values()">values</A></CODE> in class <CODE><A HREF="../../java/util/AbstractMap.html">AbstractMap</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>a collection view of the values contained in this map.</DL></DD></DL><HR><A NAME="entrySet()"><!-- --></A><H3>entrySet</H3><PRE>public <A HREF="../../java/util/Set.html">Set</A> <B>entrySet</B>()</PRE><DL><DD>Returns a set view of the mappings contained in this map.  The set's iterator returns the mappings in ascending key order.  Each element in the returned set is a <tt>Map.Entry</tt>.  The set is backed by this map, so changes to this map are reflected in the set, and vice-versa. The set supports element removal, which removes the corresponding mapping from the TreeMap, through the <tt>Iterator.remove</tt>, <tt>Set.remove</tt>, <tt>removeAll</tt>, <tt>retainAll</tt> and <tt>clear</tt> operations.  It does not support the <tt>add</tt> or <tt>addAll</tt> operations.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../java/util/Map.html#entrySet()">entrySet</A></CODE> in interface <CODE><A HREF="../../java/util/Map.html">Map</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/util/AbstractMap.html#entrySet()">entrySet</A></CODE> in class <CODE><A HREF="../../java/util/AbstractMap.html">AbstractMap</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>a set view of the mappings contained in this map.<DT><B>See Also: </B><DD><A HREF="../../java/util/Map.Entry.html"><CODE>Map.Entry</CODE></A></DL></DD></DL><HR><A NAME="subMap(java.lang.Object, java.lang.Object)"><!-- --></A><H3>subMap</H3><PRE>public <A HREF="../../java/util/SortedMap.html">SortedMap</A> <B>subMap</B>(<A HREF="../../java/lang/Object.html">Object</A>&nbsp;fromKey,                        <A HREF="../../java/lang/Object.html">Object</A>&nbsp;toKey)</PRE><DL><DD>Returns a view of the portion of this map whose keys range from <tt>fromKey</tt>, inclusive, to <tt>toKey</tt>, exclusive.  (If <tt>fromKey</tt> and <tt>toKey</tt> are equal, the returned sorted map is empty.)  The returned sorted map is backed by this map, so changes in the returned sorted map are reflected in this map, and vice-versa. The returned sorted map supports all optional map operations.<p> The sorted map returned by this method will throw an <tt>IllegalArgumentException</tt> if the user attempts to insert a key less than <tt>fromKey</tt> or greater than or equal to <tt>toKey</tt>.<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 key type allows for calculation of the successor a given key, merely request the subrange from <tt>lowEndpoint</tt> to <tt>successor(highEndpoint)</tt>. For example, suppose that <tt>m</tt> is a sorted map whose keys are strings.  The following idiom obtains a view containing all of the key-value mappings in <tt>m</tt> whose keys are between <tt>low</tt> and <tt>high</tt>, inclusive: 	    <pre>    SortedMap sub = m.submap(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 key-value mappings in <tt>m</tt> whose keys are between <tt>low</tt> and <tt>high</tt>, exclusive: 	    <pre>    SortedMap sub = m.subMap(low+"\0", high);</pre><DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../java/util/SortedMap.html#subMap(java.lang.Object, java.lang.Object)">subMap</A></CODE> in interface <CODE><A HREF="../../java/util/SortedMap.html">SortedMap</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>fromKey</CODE> - low endpoint (inclusive) of the subMap.<DD><CODE>toKey</CODE> - high endpoint (exclusive) of the subMap.<DT><B>Returns:</B><DD>a view of the portion of this map whose keys range from 	       <tt>fromKey</tt>, inclusive, to <tt>toKey</tt>, exclusive.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/ClassCastException.html">ClassCastException</A></CODE> - if <tt>fromKey</tt> and <tt>toKey</tt>         cannot be compared to one another using this map's comparator         (or, if the map has no comparator, using natural ordering).<DD><CODE><A HREF="../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if <tt>fromKey</tt> is greater than         <tt>toKey</tt>.<DD><CODE><A HREF="../../java/lang/NullPointerException.html">NullPointerException</A></CODE> - if <tt>fromKey</tt> or <tt>toKey</tt> is	       <tt>null</tt> and this map uses natural order, or its	       comparator does not tolerate <tt>null</tt> keys.</DL></DD></DL><HR><A NAME="headMap(java.lang.Object)"><!-- --></A><H3>headMap</H3><PRE>public <A HREF="../../java/util/SortedMap.html">SortedMap</A> <B>headMap</B>(<A HREF="../../java/lang/Object.html">Object</A>&nbsp;toKey)</PRE><DL><DD>Returns a view of the portion of this map whose keys are strictly less than <tt>toKey</tt>.  The returned sorted map is backed by this map, so changes in the returned sorted map are reflected in this map, and vice-versa.  The returned sorted map supports all optional map operations.<p> The sorted map returned by this method will throw an <tt>IllegalArgumentException</tt> if the user attempts to insert a key greater than or equal to <tt>toKey</tt>.<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 key type allows for calculation of the successor a given key, merely request a headMap bounded by <tt>successor(highEndpoint)</tt>. For example, suppose that suppose that <tt>m</tt> is a sorted map whose keys are strings.  The following idiom obtains a view containing all of the key-value mappings in <tt>m</tt> whose keys are less than or equal to <tt>high</tt>: <pre>     SortedMap head = m.headMap(high+"\0"); </pre><DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../java/util/SortedMap.html#headMap(java.lang.Object)">headMap</A></CODE> in interface <CODE><A HREF="../../java/util/SortedMap.html">SortedMap</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>toKey</CODE> - high endpoint (exclusive) of the headMap.<DT><B>Returns:</B><DD>a view of the portion of this map whose keys are strictly 	       less than <tt>toKey</tt>.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/ClassCastException.html">ClassCastException</A></CODE> - if <tt>toKey</tt> is not compatible         with this map's comparator (or, if the map has no comparator,         if <tt>toKey</tt> does not implement <tt>Comparable</tt>).<DD><CODE><A HREF="../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if this map is itself a subMap,         headMap, or tailMap, and <tt>toKey</tt> is not within the         specified range of the subMap, headMap, or tailMap.<DD><CODE><A HREF="../../java/lang/NullPointerException.html">NullPointerException</A></CODE> - if <tt>toKey</tt> is <tt>null</tt> and	       this map uses natural order, or its comparator does not	       tolerate <tt>null</tt> keys.</DL></DD></DL><HR><A NAME="tailMap(java.lang.Object)"><!-- --></A><H3>tailMap</H3><PRE>public <A HREF="../../java/util/SortedMap.html">SortedMap</A> <B>tailMap</B>(<A HREF="../../java/lang/Object.html">Object</A>&nbsp;fromKey)</PRE><DL><DD>Returns a view of the portion of this map whose keys are greater than or equal to <tt>fromKey</tt>.  The returned sorted map is backed by this map, so changes in the returned sorted map are reflected in this map, and vice-versa.  The returned sorted map supports all optional map operations.<p> The sorted map returned by this method will throw an <tt>IllegalArgumentException</tt> if the user attempts to insert a key less than <tt>fromKey</tt>.<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 tailMap bounded by <tt>successor(lowEndpoint)</tt>. For For example, suppose that suppose that <tt>m</tt> is a sorted map whose keys are strings.  The following idiom obtains a view containing all of the key-value mappings in <tt>m</tt> whose keys are strictly greater than <tt>low</tt>: <pre>     SortedMap tail = m.tailMap(low+"\0"); </pre><DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../java/util/SortedMap.html#tailMap(java.lang.Object)">tailMap</A></CODE> in interface <CODE><A HREF="../../java/util/SortedMap.html">SortedMap</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>fromKey</CODE> - low endpoint (inclusive) of the tailMap.<DT><B>Returns:</B><DD>a view of the portion of this map whose keys are greater 	       than or equal to <tt>fromKey</tt>.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/ClassCastException.html">ClassCastException</A></CODE> - if <tt>fromKey</tt> is not compatible         with this map's comparator (or, if the map has no comparator,         if <tt>fromKey</tt> does not implement <tt>Comparable</tt>).<DD><CODE><A HREF="../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if this map is itself a subMap,         headMap, or tailMap, and <tt>fromKey</tt> is not within the         specified range of the subMap, headMap, or tailMap.<DD><CODE><A HREF="../../java/lang/NullPointerException.html">NullPointerException</A></CODE> - if <tt>fromKey</tt> is <tt>null</tt> and	       this map uses natural order, or its comparator does not	       tolerate <tt>null</tt> keys.</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/TreeMap.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/TimeZone.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../java/util/TreeSet.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>  &nbsp;&nbsp;<A HREF="TreeMap.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;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&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 + -