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

📄 treemap.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<TD><CODE><B><A HREF="../../java/util/TreeMap.html#containsValue(java.lang.Object)">containsValue</A></B>(<A HREF="../../java/lang/Object.html">Object</A>&nbsp;value)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <tt>true</tt> if this map maps one or more keys to the specified value.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/util/Set.html">Set</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/TreeMap.html#entrySet()">entrySet</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a set view of the mappings contained in this map.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/lang/Object.html">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/TreeMap.html#firstKey()">firstKey</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the first (lowest) key currently in this sorted map.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/lang/Object.html">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/TreeMap.html#get(java.lang.Object)">get</A></B>(<A HREF="../../java/lang/Object.html">Object</A>&nbsp;key)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value to which this map maps the specified key.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/util/SortedMap.html">SortedMap</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/TreeMap.html#headMap(java.lang.Object)">headMap</A></B>(<A HREF="../../java/lang/Object.html">Object</A>&nbsp;toKey)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a view of the portion of this map whose keys are strictly less than <tt>toKey</tt>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/util/Set.html">Set</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/TreeMap.html#keySet()">keySet</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a Set view of the keys contained in this map.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/lang/Object.html">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/TreeMap.html#lastKey()">lastKey</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the last (highest) key currently in this sorted map.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/lang/Object.html">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/TreeMap.html#put(java.lang.Object, java.lang.Object)">put</A></B>(<A HREF="../../java/lang/Object.html">Object</A>&nbsp;key,    <A HREF="../../java/lang/Object.html">Object</A>&nbsp;value)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Associates the specified value with the specified key in this map.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/TreeMap.html#putAll(java.util.Map)">putAll</A></B>(<A HREF="../../java/util/Map.html">Map</A>&nbsp;map)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Copies all of the mappings from the specified map to this map.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/lang/Object.html">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/TreeMap.html#remove(java.lang.Object)">remove</A></B>(<A HREF="../../java/lang/Object.html">Object</A>&nbsp;key)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes the mapping for this key from this TreeMap if present.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/TreeMap.html#size()">size</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of key-value mappings in this map.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/util/SortedMap.html">SortedMap</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/TreeMap.html#subMap(java.lang.Object, java.lang.Object)">subMap</A></B>(<A HREF="../../java/lang/Object.html">Object</A>&nbsp;fromKey,       <A HREF="../../java/lang/Object.html">Object</A>&nbsp;toKey)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a view of the portion of this map whose keys range from <tt>fromKey</tt>, inclusive, to <tt>toKey</tt>, exclusive.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/util/SortedMap.html">SortedMap</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/TreeMap.html#tailMap(java.lang.Object)">tailMap</A></B>(<A HREF="../../java/lang/Object.html">Object</A>&nbsp;fromKey)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a view of the portion of this map whose keys are greater than or equal to <tt>fromKey</tt>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/util/Collection.html">Collection</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/TreeMap.html#values()">values</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a collection view of the values contained in this map.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.util.AbstractMap"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.util.<A HREF="../../java/util/AbstractMap.html">AbstractMap</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../java/util/AbstractMap.html#equals(java.lang.Object)">equals</A>, <A HREF="../../java/util/AbstractMap.html#hashCode()">hashCode</A>, <A HREF="../../java/util/AbstractMap.html#isEmpty()">isEmpty</A>, <A HREF="../../java/util/AbstractMap.html#toString()">toString</A></CODE></TD></TR></TABLE>&nbsp;<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="../../java/lang/Object.html">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../java/lang/Object.html#finalize()">finalize</A>, <A HREF="../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../java/lang/Object.html#wait(long)">wait</A>, <A HREF="../../java/lang/Object.html#wait(long, int)">wait</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.util.Map"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface java.util.<A HREF="../../java/util/Map.html">Map</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../java/util/Map.html#equals(java.lang.Object)">equals</A>, <A HREF="../../java/util/Map.html#hashCode()">hashCode</A>, <A HREF="../../java/util/Map.html#isEmpty()">isEmpty</A></CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><!-- ========= 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="TreeMap()"><!-- --></A><H3>TreeMap</H3><PRE>public <B>TreeMap</B>()</PRE><DL><DD>Constructs a new, empty map, sorted according to the keys' natural order.  All keys inserted into the map must implement the <tt>Comparable</tt> interface.  Furthermore, all such keys must be <i>mutually comparable</i>: <tt>k1.compareTo(k2)</tt> must not throw a ClassCastException for any elements <tt>k1</tt> and <tt>k2</tt> in the map.  If the user attempts to put a key into the map that violates this constraint (for example, the user attempts to put a string key into a map whose keys are integers), the <tt>put(Object key, Object value)</tt> call will throw a <tt>ClassCastException</tt>.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../java/lang/Comparable.html"><CODE>Comparable</CODE></A></DL></DD></DL><HR><A NAME="TreeMap(java.util.Comparator)"><!-- --></A><H3>TreeMap</H3><PRE>public <B>TreeMap</B>(<A HREF="../../java/util/Comparator.html">Comparator</A>&nbsp;c)</PRE><DL><DD>Constructs a new, empty map, sorted according to the given comparator. All keys inserted into the map must be <i>mutually comparable</i> by the given comparator: <tt>comparator.compare(k1, k2)</tt> must not throw a <tt>ClassCastException</tt> for any keys <tt>k1</tt> and <tt>k2</tt> in the map.  If the user attempts to put a key into the map that violates this constraint, the <tt>put(Object key, Object value)</tt> call will throw a <tt>ClassCastException</tt>.<DD><DL><DT><B>Parameters:</B><DD><CODE>c</CODE> - the comparator that will be used to sort this map.  A        <tt>null</tt> value indicates that the keys' <i>natural        ordering</i> should be used.</DL></DD></DL><HR><A NAME="TreeMap(java.util.Map)"><!-- --></A><H3>TreeMap</H3><PRE>public <B>TreeMap</B>(<A HREF="../../java/util/Map.html">Map</A>&nbsp;m)</PRE><DL><DD>Constructs a new map containing the same mappings as the given map, sorted according to the keys' <i>natural order</i>.  All keys inserted into the new map must implement the <tt>Comparable</tt> interface. Furthermore, all such keys must be <i>mutually comparable</i>: <tt>k1.compareTo(k2)</tt> must not throw a <tt>ClassCastException</tt> for any elements <tt>k1</tt> and <tt>k2</tt> in the map.  This method runs in n*log(n) time.<DD><DL><DT><B>Parameters:</B><DD><CODE>m</CODE> - the map whose mappings are to be placed in this map.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/ClassCastException.html">ClassCastException</A></CODE> - the keys in t are not Comparable, or         are not mutually comparable.</DL></DD></DL><HR><A NAME="TreeMap(java.util.SortedMap)"><!-- --></A><H3>TreeMap</H3><PRE>public <B>TreeMap</B>(<A HREF="../../java/util/SortedMap.html">SortedMap</A>&nbsp;m)</PRE><DL><DD>Constructs a new map containing the same mappings as the given <tt>SortedMap</tt>, sorted according to the same ordering.  This method runs in linear time.<DD><DL><DT><B>Parameters:</B><DD><CODE>m</CODE> - the sorted map whose mappings are to be placed in this map,         and whose comparator is to be used to sort this map.</DL></DD></DL><!-- ============ METHOD DETAIL ========== -->

⌨️ 快捷键说明

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