📄 weakhashmap.html
字号:
<TD><CODE><A HREF="../../java/util/AbstractMap.html#containsValue(java.lang.Object)">containsValue</A>, <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#keySet()">keySet</A>, <A HREF="../../java/util/AbstractMap.html#putAll(java.util.Map)">putAll</A>, <A HREF="../../java/util/AbstractMap.html#toString()">toString</A>, <A HREF="../../java/util/AbstractMap.html#values()">values</A></CODE></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="../../java/lang/Object.html">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../java/lang/Object.html#clone()">clone</A>, <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> <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#containsValue(java.lang.Object)">containsValue</A>, <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#keySet()">keySet</A>, <A HREF="../../java/util/Map.html#putAll(java.util.Map)">putAll</A>, <A HREF="../../java/util/Map.html#values()">values</A></CODE></TD></TR></TABLE> <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="WeakHashMap(int, float)"><!-- --></A><H3>WeakHashMap</H3><PRE>public <B>WeakHashMap</B>(int initialCapacity, float loadFactor)</PRE><DL><DD>Constructs a new, empty <code>WeakHashMap</code> with the given initial capacity and the given load factor.<DD><DL><DT><B>Parameters:</B><DD><CODE>initialCapacity</CODE> - The initial capacity of the <code>WeakHashMap</code><DD><CODE>loadFactor</CODE> - The load factor of the <code>WeakHashMap</code><DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - If the initial capacity is less than zero, or if the load factor is nonpositive</DL></DD></DL><HR><A NAME="WeakHashMap(int)"><!-- --></A><H3>WeakHashMap</H3><PRE>public <B>WeakHashMap</B>(int initialCapacity)</PRE><DL><DD>Constructs a new, empty <code>WeakHashMap</code> with the given initial capacity and the default load factor, which is <code>0.75</code>.<DD><DL><DT><B>Parameters:</B><DD><CODE>initialCapacity</CODE> - The initial capacity of the <code>WeakHashMap</code><DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - If the initial capacity is less than zero</DL></DD></DL><HR><A NAME="WeakHashMap()"><!-- --></A><H3>WeakHashMap</H3><PRE>public <B>WeakHashMap</B>()</PRE><DL><DD>Constructs a new, empty <code>WeakHashMap</code> with the default initial capacity and the default load factor, which is <code>0.75</code>.</DL><HR><A NAME="WeakHashMap(java.util.Map)"><!-- --></A><H3>WeakHashMap</H3><PRE>public <B>WeakHashMap</B>(<A HREF="../../java/util/Map.html">Map</A> t)</PRE><DL><DD>Constructs a new <code>WeakHashMap</code> with the same mappings as the specified <tt>Map</tt>. The <code>WeakHashMap</code> is created with an initial capacity of twice the number of mappings in the specified map or 11 (whichever is greater), and a default load factor, which is <tt>0.75</tt>.<DD><DL><DT><B>Parameters:</B><DD><CODE>t</CODE> - the map whose mappings are to be placed in this map.<DT><B>Since: </B><DD>1.3</DD></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="size()"><!-- --></A><H3>size</H3><PRE>public int <B>size</B>()</PRE><DL><DD>Returns the number of key-value mappings in this map. <strong>Note:</strong> <em>In contrast with most implementations of the <code>Map</code> interface, the time required by this operation is linear in the size of the map.</em><DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../java/util/Map.html#size()">size</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#size()">size</A></CODE> in class <CODE><A HREF="../../java/util/AbstractMap.html">AbstractMap</A></CODE></DL></DD><DD>Following copied from interface: <CODE>java.util.Map</CODE></DD><DD><DL><DT><B>Returns:</B><DD>the number of key-value mappings in this map.</DL></DD></DL><HR><A NAME="isEmpty()"><!-- --></A><H3>isEmpty</H3><PRE>public boolean <B>isEmpty</B>()</PRE><DL><DD>Returns <code>true</code> if this map contains no key-value mappings.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../java/util/Map.html#isEmpty()">isEmpty</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#isEmpty()">isEmpty</A></CODE> in class <CODE><A HREF="../../java/util/AbstractMap.html">AbstractMap</A></CODE></DL></DD><DD>Following copied from interface: <CODE>java.util.Map</CODE></DD><DD><DL><DT><B>Returns:</B><DD><tt>true</tt> if this map contains no key-value mappings.</DL></DD></DL><HR><A NAME="containsKey(java.lang.Object)"><!-- --></A><H3>containsKey</H3><PRE>public boolean <B>containsKey</B>(<A HREF="../../java/lang/Object.html">Object</A> key)</PRE><DL><DD>Returns <code>true</code> if this map contains a mapping for the specified key.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../java/util/Map.html#containsKey(java.lang.Object)">containsKey</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#containsKey(java.lang.Object)">containsKey</A></CODE> in class <CODE><A HREF="../../java/util/AbstractMap.html">AbstractMap</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - The key whose presence in this map is to be tested</DL></DD></DL><HR><A NAME="get(java.lang.Object)"><!-- --></A><H3>get</H3><PRE>public <A HREF="../../java/lang/Object.html">Object</A> <B>get</B>(<A HREF="../../java/lang/Object.html">Object</A> key)</PRE><DL><DD>Returns the value to which this map maps the specified <code>key</code>. If this map does not contain a value for this key, then return <code>null</code>.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../java/util/Map.html#get(java.lang.Object)">get</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#get(java.lang.Object)">get</A></CODE> in class <CODE><A HREF="../../java/util/AbstractMap.html">AbstractMap</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - The key whose associated value, if any, is to be returned</DL></DD></DL><HR><A NAME="put(java.lang.Object, java.lang.Object)"><!-- --></A><H3>put</H3><PRE>public <A HREF="../../java/lang/Object.html">Object</A> <B>put</B>(<A HREF="../../java/lang/Object.html">Object</A> key, <A HREF="../../java/lang/Object.html">Object</A> value)</PRE><DL><DD>Updates this map so that the given <code>key</code> maps to the given <code>value</code>. If the map previously contained a mapping for <code>key</code> then that mapping is replaced and the previous value is returned.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../java/util/Map.html#put(java.lang.Object, java.lang.Object)">put</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#put(java.lang.Object, java.lang.Object)">put</A></CODE> in class <CODE><A HREF="../../java/util/AbstractMap.html">AbstractMap</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - The key that is to be mapped to the given <code>value</code><DD><CODE>value</CODE> - The value to which the given <code>key</code> is to be mapped<DT><B>Returns:</B><DD>The previous value to which this key was mapped, or <code>null</code> if if there was no mapping for the key</DL></DD></DL><HR><A NAME="remove(java.lang.Object)"><!-- --></A><H3>remove</H3><PRE>public <A HREF="../../java/lang/Object.html">Object</A> <B>remove</B>(<A HREF="../../java/lang/Object.html">Object</A> key)</PRE><DL><DD>Removes the mapping for the given <code>key</code> from this map, if present.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../java/util/Map.html#remove(java.lang.Object)">remove</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#remove(java.lang.Object)">remove</A></CODE> in class <CODE><A HREF="../../java/util/AbstractMap.html">AbstractMap</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - The key whose mapping is to be removed<DT><B>Returns:</B><DD>The value to which this key was mapped, or <code>null</code> if there was no mapping for the key</DL></DD></DL><HR><A NAME="clear()"><!-- --></A><H3>clear</H3><PRE>public void <B>clear</B>()</PRE><DL><DD>Removes all mappings from this map.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../java/util/Map.html#clear()">clear</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#clear()">clear</A></CODE> in class <CODE><A HREF="../../java/util/AbstractMap.html">AbstractMap</A></CODE></DL></DD><DD>Following copied from interface: <CODE>java.util.Map</CODE></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/UnsupportedOperationException.html">UnsupportedOperationException</A></CODE> - clear is not supported by 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 <code>Set</code> view of the mappings in this map.<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>Following copied from interface: <CODE>java.util.Map</CODE></DD><DD><DL><DT><B>Returns:</B><DD>a set view of the mappings contained in this map.</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> </TD> <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="class-use/WeakHashMap.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </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-files/index-1.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><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Std. Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../java/util/Vector.html"><B>PREV CLASS</B></A> NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="WeakHashMap.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <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 + -