📄 dictionary.html
字号:
<!-- ============ 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="Dictionary()"><!-- --></A><H3>Dictionary</H3><PRE>public <B>Dictionary</B>()</PRE><DL><DD>Sole constructor. (For invocation by subclass constructors, typically implicit.)</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 abstract int <B>size</B>()</PRE><DL><DD>Returns the number of entries (dinstint keys) in this dictionary.<DD><DL><DT><B>Returns:</B><DD>the number of keys in this dictionary.</DL></DD></DL><HR><A NAME="isEmpty()"><!-- --></A><H3>isEmpty</H3><PRE>public abstract boolean <B>isEmpty</B>()</PRE><DL><DD>Tests if this dictionary maps no keys to value. The general contract for the <tt>isEmpty</tt> method is that the result is true if and only if this dictionary contains no entries.<DD><DL><DT><B>Returns:</B><DD><code>true</code> if this dictionary maps no keys to values; <code>false</code> otherwise.</DL></DD></DL><HR><A NAME="keys()"><!-- --></A><H3>keys</H3><PRE>public abstract <A HREF="../../java/util/Enumeration.html">Enumeration</A> <B>keys</B>()</PRE><DL><DD>Returns an enumeration of the keys in this dictionary. The general contract for the keys method is that an <tt>Enumeration</tt> object is returned that will generate all the keys for which this dictionary contains entries.<DD><DL><DT><B>Returns:</B><DD>an enumeration of the keys in this dictionary.<DT><B>See Also: </B><DD><A HREF="../../java/util/Dictionary.html#elements()"><CODE>elements()</CODE></A>, <A HREF="../../java/util/Enumeration.html"><CODE>Enumeration</CODE></A></DL></DD></DL><HR><A NAME="elements()"><!-- --></A><H3>elements</H3><PRE>public abstract <A HREF="../../java/util/Enumeration.html">Enumeration</A> <B>elements</B>()</PRE><DL><DD>Returns an enumeration of the values in this dictionary. The general contract for the <tt>elements</tt> method is that an <tt>Enumeration</tt> is returned that will generate all the elements contained in entries in this dictionary.<DD><DL><DT><B>Returns:</B><DD>an enumeration of the values in this dictionary.<DT><B>See Also: </B><DD><A HREF="../../java/util/Dictionary.html#keys()"><CODE>keys()</CODE></A>, <A HREF="../../java/util/Enumeration.html"><CODE>Enumeration</CODE></A></DL></DD></DL><HR><A NAME="get(java.lang.Object)"><!-- --></A><H3>get</H3><PRE>public abstract <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 the key is mapped in this dictionary. The general contract for the <tt>isEmpty</tt> method is that if this dictionary contains an entry for the specified key, the associated value is returned; otherwise, <tt>null</tt> is returned.<DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - a key in this dictionary. <code>null</code> if the key is not mapped to any value in this dictionary.<DT><B>Returns:</B><DD>the value to which the key is mapped in this dictionary;<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/NullPointerException.html">NullPointerException</A></CODE> - if the <tt>key</tt> is <tt>null</tt>.<DT><B>See Also: </B><DD><A HREF="../../java/util/Dictionary.html#put(java.lang.Object, java.lang.Object)"><CODE>put(java.lang.Object, java.lang.Object)</CODE></A></DL></DD></DL><HR><A NAME="put(java.lang.Object, java.lang.Object)"><!-- --></A><H3>put</H3><PRE>public abstract <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>Maps the specified <code>key</code> to the specified <code>value</code> in this dictionary. Neither the key nor the value can be <code>null</code>. <p> If this dictionary already contains an entry for the specified <tt>key</tt>, the value already in this dictionary for that <tt>key</tt> is returned, after modifying the entry to contain the new element. <p>If this dictionary does not already have an entry for the specified <tt>key</tt>, an entry is created for the specified <tt>key</tt> and <tt>value</tt>, and <tt>null</tt> is returned. <p> The <code>value</code> can be retrieved by calling the <code>get</code> method with a <code>key</code> that is equal to the original <code>key</code>.<DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - the hashtable key.<DD><CODE>value</CODE> - the value.<DT><B>Returns:</B><DD>the previous value to which the <code>key</code> was mapped in this dictionary, or <code>null</code> if the key did not have a previous mapping.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/NullPointerException.html">NullPointerException</A></CODE> - if the <code>key</code> or <code>value</code> is <code>null</code>.<DT><B>See Also: </B><DD><A HREF="../../java/lang/Object.html#equals(java.lang.Object)"><CODE>Object.equals(java.lang.Object)</CODE></A>, <A HREF="../../java/util/Dictionary.html#get(java.lang.Object)"><CODE>get(java.lang.Object)</CODE></A></DL></DD></DL><HR><A NAME="remove(java.lang.Object)"><!-- --></A><H3>remove</H3><PRE>public abstract <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 <code>key</code> (and its corresponding <code>value</code>) from this dictionary. This method does nothing if the <code>key</code> is not in this dictionary.<DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - the key that needs to be removed.<DT><B>Returns:</B><DD>the value to which the <code>key</code> had been mapped in this dictionary, or <code>null</code> if the key did not have a mapping.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/NullPointerException.html">NullPointerException</A></CODE> - if <tt>key</tt> is <tt>null</tt>.</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/Dictionary.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/Date.html"><B>PREV CLASS</B></A> <A HREF="../../java/util/EventObject.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> <A HREF="Dictionary.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 + -