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

📄 java.util.hashtable.html

📁 swing 教程,与大家分享一下,哈哈,希望大家多多指教
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<PRE>
   public int size() </PRE>
<BLOCKQUOTE>
<DL>
<P>
Returns the number of keys in this hashtable.
<P>
<DT> <B>Returns:</B>
<DD> the number of keys in this hashtable.
<DT><B>Overrides:</B>
<DD><A HREF="java.util.Dictionary.html#size()">size</A> in class <A HREF="java.util.Dictionary.html">Dictionary</A>
<DT><B>Implements:</B>
<DD><A HREF="java.util.Map.html#size()">size</A> in interface <A HREF="java.util.Map.html">Map</A>
</DL>
</BLOCKQUOTE> <BR>

<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=1 BORDER=0> <TR> <TD WIDTH=80%>
<BR><H3><A NAME="isEmpty"><FONT COLOR="#FF0000">&middot;</FONT></A>
<A NAME="isEmpty()">isEmpty</A> </H3>
</TD> <TD ALIGN=right WIDTH=20%> <FONT SIZE="-2"><A HREF="#_Summary_">Summary</A> &nbsp;|&nbsp; <A HREF=#_top_>Top</A></FONT> </TD> </TR> </TABLE>
<PRE>
   public boolean isEmpty() </PRE>
<BLOCKQUOTE>
<DL>
<P>
Tests if this hashtable maps no keys to values.
<P>
<DT> <B>Returns:</B>
<DD> <code>true</code> if this hashtable maps no keys to values;          <code>false</code> otherwise.
<DT><B>Overrides:</B>
<DD><A HREF="java.util.Dictionary.html#isEmpty()">isEmpty</A> in class <A HREF="java.util.Dictionary.html">Dictionary</A>
<DT><B>Implements:</B>
<DD><A HREF="java.util.Map.html#isEmpty()">isEmpty</A> in interface <A HREF="java.util.Map.html">Map</A>
</DL>
</BLOCKQUOTE> <BR>

<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=1 BORDER=0> <TR> <TD WIDTH=80%>
<BR><H3><A NAME="keys"><FONT COLOR="#FF0000">&middot;</FONT></A>
<A NAME="keys()">keys</A> </H3>
</TD> <TD ALIGN=right WIDTH=20%> <FONT SIZE="-2"><A HREF="#_Summary_">Summary</A> &nbsp;|&nbsp; <A HREF=#_top_>Top</A></FONT> </TD> </TR> </TABLE>
<PRE>
   public synchronized <A HREF="java.util.Enumeration.html">Enumeration</A> keys() </PRE>
<BLOCKQUOTE>
<DL>
<P>
Returns an enumeration of the keys in this hashtable.
<P>
<DT> <B>Returns:</B>
<DD> an enumeration of the keys in this hashtable.
<DT><B>Overrides:</B>
<DD><A HREF="java.util.Dictionary.html#keys()">keys</A> in class <A HREF="java.util.Dictionary.html">Dictionary</A>
</DL>
<P> <B>See Also:</B>
<A HREF="java.util.Enumeration.html">Enumeration</A>, <A HREF="#elements()">elements</A>, <A HREF="#keySet()">keySet</A>, <A HREF="java.util.Map.html">Map</A></BLOCKQUOTE> <BR>

<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=1 BORDER=0> <TR> <TD WIDTH=80%>
<BR><H3><A NAME="elements"><FONT COLOR="#FF0000">&middot;</FONT></A>
<A NAME="elements()">elements</A> </H3>
</TD> <TD ALIGN=right WIDTH=20%> <FONT SIZE="-2"><A HREF="#_Summary_">Summary</A> &nbsp;|&nbsp; <A HREF=#_top_>Top</A></FONT> </TD> </TR> </TABLE>
<PRE>
   public synchronized <A HREF="java.util.Enumeration.html">Enumeration</A> elements() </PRE>
<BLOCKQUOTE>
<DL>
<P>
Returns an enumeration of the values in this hashtable. Use the Enumeration methods on the returned object to fetch the elements sequentially.
<P>
<DT> <B>Returns:</B>
<DD> an enumeration of the values in this hashtable.
<DT><B>Overrides:</B>
<DD><A HREF="java.util.Dictionary.html#elements()">elements</A> in class <A HREF="java.util.Dictionary.html">Dictionary</A>
</DL>
<P> <B>See Also:</B>
<A HREF="java.util.Enumeration.html">Enumeration</A>, <A HREF="#keys()">keys</A>, <A HREF="#values()">values</A>, <A HREF="java.util.Map.html">Map</A></BLOCKQUOTE> <BR>

<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=1 BORDER=0> <TR> <TD WIDTH=80%>
<BR><H3><A NAME="contains"><FONT COLOR="#FF0000">&middot;</FONT></A>
<A NAME="contains(java.lang.Object)">contains</A> </H3>
</TD> <TD ALIGN=right WIDTH=20%> <FONT SIZE="-2"><A HREF="#_Summary_">Summary</A> &nbsp;|&nbsp; <A HREF=#_top_>Top</A></FONT> </TD> </TR> </TABLE>
<PRE>
   public synchronized boolean contains(<A HREF="java.lang.Object.html">Object</A> value) </PRE>
<BLOCKQUOTE>
<DL>
<P>
Tests if some key maps into the specified value in this hashtable. This operation is more expensive than the <code>containsKey</code> method.<p> Note that this method is identical in functionality to containsValue, (which is part of the Map interface in the collections framework).
<P>
<TABLE WIDTH="87%" BORDER=1 CELLPADDING=3 CELLSPACING=0> <TR VALIGN=TOP BGCOLOR="#CCCCCC"> <TD><B>Parameter</B></TD> <TD><B>Description</B></TD> </TR>
<TR VALIGN=TOP> <TD><I> value</I></TD> <TD>a value to search for.</TD></TR>
</TABLE><P>
<DT> <B>Returns:</B>
<DD> <code>true</code> if and only if some key maps to the             <code>value</code> argument in this hashtable as              determined by the <tt>equals</tt> method;             <code>false</code> otherwise.
<DT> <B>Throws:</B> <A HREF="java.lang.NullPointerException.html">NullPointerException</A>
<DD> if the value is <code>null</code>.
</DL>
<P> <B>See Also:</B>
<A HREF="#containsKey(Object)">containsKey</A>, <A HREF="#containsValue(Object)">containsValue</A>, <A HREF="java.util.Map.html">Map</A></BLOCKQUOTE> <BR>

<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=1 BORDER=0> <TR> <TD WIDTH=80%>
<BR><H3><A NAME="containsValue"><FONT COLOR="#FF0000">&middot;</FONT></A>
<A NAME="containsValue(java.lang.Object)">containsValue</A> </H3>
</TD> <TD ALIGN=right WIDTH=20%> <FONT SIZE="-2"><A HREF="#_Summary_">Summary</A> &nbsp;|&nbsp; <A HREF=#_top_>Top</A></FONT> </TD> </TR> </TABLE>
<PRE>
   public boolean containsValue(<A HREF="java.lang.Object.html">Object</A> value) </PRE>
<BLOCKQUOTE>
<DL>
<P>
Returns true if this Hashtable maps one or more keys to this value.<p> Note that this method is identical in functionality to contains (which predates the Map interface).
<P>
<TABLE WIDTH="87%" BORDER=1 CELLPADDING=3 CELLSPACING=0> <TR VALIGN=TOP BGCOLOR="#CCCCCC"> <TD><B>Parameter</B></TD> <TD><B>Description</B></TD> </TR>
<TR VALIGN=TOP> <TD><I> value</I></TD> <TD>value whose presence in this Hashtable is to be tested.</TD></TR>
</TABLE><P>
<DT><B>Implements:</B>
<DD><A HREF="java.util.Map.html#containsValue(java.lang.Object)">containsValue</A> in interface <A HREF="java.util.Map.html">Map</A>
</DL>
<P> <B>See Also:</B>
<A HREF="java.util.Map.html">Map</A></BLOCKQUOTE> <BR>

<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=1 BORDER=0> <TR> <TD WIDTH=80%>
<BR><H3><A NAME="containsKey"><FONT COLOR="#FF0000">&middot;</FONT></A>
<A NAME="containsKey(java.lang.Object)">containsKey</A> </H3>
</TD> <TD ALIGN=right WIDTH=20%> <FONT SIZE="-2"><A HREF="#_Summary_">Summary</A> &nbsp;|&nbsp; <A HREF=#_top_>Top</A></FONT> </TD> </TR> </TABLE>
<PRE>
   public synchronized boolean containsKey(<A HREF="java.lang.Object.html">Object</A> key) </PRE>
<BLOCKQUOTE>
<DL>
<P>
Tests if the specified object is a key in this hashtable.
<P>
<TABLE WIDTH="87%" BORDER=1 CELLPADDING=3 CELLSPACING=0> <TR VALIGN=TOP BGCOLOR="#CCCCCC"> <TD><B>Parameter</B></TD> <TD><B>Description</B></TD> </TR>
<TR VALIGN=TOP> <TD><I> key</I></TD> <TD>possible key.</TD></TR>
</TABLE><P>
<DT> <B>Returns:</B>
<DD> <code>true</code> if and only if the specified object           is a key in this hashtable, as determined by the           <tt>equals</tt> method; <code>false</code> otherwise.
<DT><B>Implements:</B>
<DD><A HREF="java.util.Map.html#containsKey(java.lang.Object)">containsKey</A> in interface <A HREF="java.util.Map.html">Map</A>
</DL>
<P> <B>See Also:</B>
<A HREF="#contains(Object)">contains</A></BLOCKQUOTE> <BR>

<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=1 BORDER=0> <TR> <TD WIDTH=80%>
<BR><H3><A NAME="get"><FONT COLOR="#FF0000">&middot;</FONT></A>
<A NAME="get(java.lang.Object)">get</A> </H3>
</TD> <TD ALIGN=right WIDTH=20%> <FONT SIZE="-2"><A HREF="#_Summary_">Summary</A> &nbsp;|&nbsp; <A HREF=#_top_>Top</A></FONT> </TD> </TR> </TABLE>
<PRE>
   public synchronized <A HREF="java.lang.Object.html">Object</A> get(<A HREF="java.lang.Object.html">Object</A> key) </PRE>
<BLOCKQUOTE>
<DL>
<P>
Returns the value to which the specified key is mapped in this hashtable.
<P>
<TABLE WIDTH="87%" BORDER=1 CELLPADDING=3 CELLSPACING=0> <TR VALIGN=TOP BGCOLOR="#CCCCCC"> <TD><B>Parameter</B></TD> <TD><B>Description</B></TD> </TR>
<TR VALIGN=TOP> <TD><I> key</I></TD> <TD>a key in the hashtable.</TD></TR>
</TABLE><P>
<DT> <B>Returns:</B>
<DD> the value to which the key is mapped in this hashtable;          <code>null</code> if the key is not mapped to any value in          this hashtable.
<DT><B>Overrides:</B>
<DD><A HREF="java.util.Dictionary.html#get(java.lang.Object)">get</A> in class <A HREF="java.util.Dictionary.html">Dictionary</A>
<DT><B>Implements:</B>
<DD><A HREF="java.util.Map.html#get(java.lang.Object)">get</A> in interface <A HREF="java.util.Map.html">Map</A>
</DL>
<P> <B>See Also:</B>
<A HREF="#put(Object, Object)">put</A></BLOCKQUOTE> <BR>

<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=1 BORDER=0> <TR> <TD WIDTH=80%>
<BR><H3><A NAME="rehash"><FONT COLOR="#FF0000">&middot;</FONT></A>
<A NAME="rehash()">rehash</A> </H3>
</TD> <TD ALIGN=right WIDTH=20%> <FONT SIZE="-2"><A HREF="#_Summary_">Summary</A> &nbsp;|&nbsp; <A HREF=#_top_>Top</A></FONT> </TD> </TR> </TABLE>
<PRE>
   protected void rehash() </PRE>
<BLOCKQUOTE>
<DL>
<P>
Increases the capacity of and internally reorganizes this  hashtable, in order to accommodate and access its entries more  efficiently.  This method is called automatically when the  number of keys in the hashtable exceeds this hashtable's capacity  and load factor.
<P>
</DL>
</BLOCKQUOTE> <BR>

<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=1 BORDER=0> <TR> <TD WIDTH=80%>
<BR><H3><A NAME="put"><FONT COLOR="#FF0000">&middot;</FONT></A>
<A NAME="put(java.lang.Object, java.lang.Object)">put</A> </H3>
</TD> <TD ALIGN=right WIDTH=20%> <FONT SIZE="-2"><A HREF="#_Summary_">Summary</A> &nbsp;|&nbsp; <A HREF=#_top_>Top</A></FONT> </TD> </TR> </TABLE>
<PRE>
   public synchronized <A HREF="java.lang.Object.html">Object</A> put(<A HREF="java.lang.Object.html">Object</A> key, 
                                  <A HREF="java.lang.Object.html">Object</A> value) </PRE>
<BLOCKQUOTE>
<DL>
<P>
Maps the specified <code>key</code> to the specified  <code>value</code> in this hashtable. Neither the key nor the  value can be <code>null</code>. <p> The value can be retrieved by calling the <code>get</code> method  with a key that is equal to the original key.
<P>
<TABLE WIDTH="87%" BORDER=1 CELLPADDING=3 CELLSPACING=0> <TR VALIGN=TOP BGCOLOR="#CCCCCC"> <TD><B>Parameter</B></TD> <TD><B>Description</B></TD> </TR>
<TR VALIGN=TOP> <TD><I> key</I></TD> <TD>the hashtable key.</TD></TR>
<TR VALIGN=TOP> <TD><I> value</I></TD> <TD>the value.</TD></TR>
</TABLE><P>
<DT> <B>Returns:</B>
<DD> the previous value of the specified key in this hashtable,             or <code>null</code> if it did not have one.
<DT> <B>Throws:</B> <A HREF="java.lang.NullPointerException.html">NullPointerException</A>
<DD> if the key or value is               <code>null</code>.
<DT><B>Overrides:</B>

⌨️ 快捷键说明

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