identityhashmap.html

来自「j2se5-api-zh,java文档的中文版本」· HTML 代码 · 共 742 行 · 第 1/4 页

HTML
742
字号
<TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="IdentityHashMap.html#IdentityHashMap(java.util.Map)">IdentityHashMap</A></B>(<A HREF="Map.html" title="java.util 中的接口">Map</A>&lt;? extends <A HREF="IdentityHashMap.html" title="IdentityHashMap 中的类型参数">K</A>,? extends <A HREF="IdentityHashMap.html" title="IdentityHashMap 中的类型参数">V</A>&gt;&nbsp;m)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;构造包含指定映射中键-值映射关系的新标识哈希映射。</TD></TR></TABLE>&nbsp;<!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>方法摘要</B></FONT></TH></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="IdentityHashMap.html#clear()">clear</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;从映射中移除所有映射关系。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../lang/Object.html" title="java.lang 中的类">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="IdentityHashMap.html#clone()">clone</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回此标识哈希映射的浅表复制:不克隆键和值本身。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="IdentityHashMap.html#containsKey(java.lang.Object)">containsKey</A></B>(<A HREF="../lang/Object.html" title="java.lang 中的类">Object</A>&nbsp;key)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;测试指定的对象引用是否为此标识哈希映射中的键。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="IdentityHashMap.html#containsValue(java.lang.Object)">containsValue</A></B>(<A HREF="../lang/Object.html" title="java.lang 中的类">Object</A>&nbsp;value)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;测试指定的对象引用是否为此标识哈希映射中的值。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="Set.html" title="java.util 中的接口">Set</A>&lt;<A HREF="Map.Entry.html" title="java.util 中的接口">Map.Entry</A>&lt;<A HREF="IdentityHashMap.html" title="IdentityHashMap 中的类型参数">K</A>,<A HREF="IdentityHashMap.html" title="IdentityHashMap 中的类型参数">V</A>&gt;&gt;</CODE></FONT></TD><TD><CODE><B><A HREF="IdentityHashMap.html#entrySet()">entrySet</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回此映射所包含映射关系的 set 视图。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="IdentityHashMap.html#equals(java.lang.Object)">equals</A></B>(<A HREF="../lang/Object.html" title="java.lang 中的类">Object</A>&nbsp;o)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;比较指定对象与此映射的相等性。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="IdentityHashMap.html" title="IdentityHashMap 中的类型参数">V</A></CODE></FONT></TD><TD><CODE><B><A HREF="IdentityHashMap.html#get(java.lang.Object)">get</A></B>(<A HREF="../lang/Object.html" title="java.lang 中的类">Object</A>&nbsp;key)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回指定键在此标识哈希映射中所映射的值;或者如果映射不包含此键的任何映射关系,则返回 <tt>null</tt>。</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="IdentityHashMap.html#hashCode()">hashCode</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回映射的哈希代码值。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="IdentityHashMap.html#isEmpty()">isEmpty</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;如果此标识哈希映射不包含键-值映射关系,则返回 <tt>true</tt>。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="Set.html" title="java.util 中的接口">Set</A>&lt;<A HREF="IdentityHashMap.html" title="IdentityHashMap 中的类型参数">K</A>&gt;</CODE></FONT></TD><TD><CODE><B><A HREF="IdentityHashMap.html#keySet()">keySet</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回映射中所包含键的基于标识的 set 视图。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="IdentityHashMap.html" title="IdentityHashMap 中的类型参数">V</A></CODE></FONT></TD><TD><CODE><B><A HREF="IdentityHashMap.html#put(K, V)">put</A></B>(<A HREF="IdentityHashMap.html" title="IdentityHashMap 中的类型参数">K</A>&nbsp;key,    <A HREF="IdentityHashMap.html" title="IdentityHashMap 中的类型参数">V</A>&nbsp;value)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;在此标识哈希映射中关联指定值与指定键。</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="IdentityHashMap.html#putAll(java.util.Map)">putAll</A></B>(<A HREF="Map.html" title="java.util 中的接口">Map</A>&lt;? extends <A HREF="IdentityHashMap.html" title="IdentityHashMap 中的类型参数">K</A>,? extends <A HREF="IdentityHashMap.html" title="IdentityHashMap 中的类型参数">V</A>&gt;&nbsp;t)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;将指定映射的全部映射关系复制到此映射,这些映射关系将替换此映射目前针对指定映射的任何键的任何映射关系。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="IdentityHashMap.html" title="IdentityHashMap 中的类型参数">V</A></CODE></FONT></TD><TD><CODE><B><A HREF="IdentityHashMap.html#remove(java.lang.Object)">remove</A></B>(<A HREF="../lang/Object.html" title="java.lang 中的类">Object</A>&nbsp;key)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;移除映射中此键的映射关系(如果存在的话)。</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="IdentityHashMap.html#size()">size</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回标识哈希映射中的键-值映射关系数。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="Collection.html" title="java.util 中的接口">Collection</A>&lt;<A HREF="IdentityHashMap.html" title="IdentityHashMap 中的类型参数">V</A>&gt;</CODE></FONT></TD><TD><CODE><B><A HREF="IdentityHashMap.html#values()">values</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回映射所包含值的 collection 视图。</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.util.AbstractMap"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>从类 java.util.<A HREF="AbstractMap.html" title="java.util 中的类">AbstractMap</A> 继承的方法</B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="AbstractMap.html#toString()">toString</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>从类 java.lang.<A HREF="../lang/Object.html" title="java.lang 中的类">Object</A> 继承的方法</B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../lang/Object.html#finalize()">finalize</A>, <A HREF="../lang/Object.html#getClass()">getClass</A>, <A HREF="../lang/Object.html#notify()">notify</A>, <A HREF="../lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../lang/Object.html#wait()">wait</A>, <A HREF="../lang/Object.html#wait(long)">wait</A>, <A HREF="../lang/Object.html#wait(long, int)">wait</A></CODE></TD></TR></TABLE>&nbsp;<P><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>构造方法详细信息</B></FONT></TH></TR></TABLE><A NAME="IdentityHashMap()"><!-- --></A><H3>IdentityHashMap</H3><PRE>public <B>IdentityHashMap</B>()</PRE><DL><DD>构造一个具有默认期望最大数量 (21) 的新的空标识哈希映射。<P></DL><HR><A NAME="IdentityHashMap(int)"><!-- --></A><H3>IdentityHashMap</H3><PRE>public <B>IdentityHashMap</B>(int&nbsp;expectedMaxSize)</PRE><DL><DD>构造一个具有指定期望最大数量的新的空映射。将多于期望数的键-值映射关系放置到映射中可能会导致内部数据结构的增长,这种增长是颇为耗时的。<P>

⌨️ 快捷键说明

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