зеркало из https://github.com/mozilla/gecko-dev.git
368 строки
14 KiB
HTML
368 строки
14 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
|
<!--NewPage-->
|
|
<HTML>
|
|
<HEAD>
|
|
<!-- Generated by javadoc on Sun Aug 01 23:07:05 MDT 1999 -->
|
|
<TITLE>
|
|
: Class AtomHashtable
|
|
</TITLE>
|
|
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
|
|
</HEAD>
|
|
<BODY BGCOLOR="white">
|
|
|
|
<!-- ========== START OF NAVBAR ========== -->
|
|
<A NAME="navbar_top"><!-- --></A>
|
|
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
|
<TR>
|
|
<TD COLSPAN=2 BGCOLOR="#EEEEFF" ID="NavBarCell1">
|
|
<A NAME="navbar_top_firstrow"><!-- --></A>
|
|
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
|
<TR ALIGN="center" VALIGN="top">
|
|
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#FFFFFF" ID="NavBarCell1Rev"> <FONT ID="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
|
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
|
</TR>
|
|
</TABLE>
|
|
</TD>
|
|
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
|
</EM>
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR>
|
|
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../calypso/util/Atom.html"><B>PREV CLASS</B></A>
|
|
<A HREF="../../calypso/util/AttributeValuePair.html"><B>NEXT CLASS</B></A></FONT></TD>
|
|
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>
|
|
<A HREF="AtomHashtable.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
|
|
</TR>
|
|
<TR>
|
|
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
|
|
SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
<TD VALIGN="top" ID="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>
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<H2>
|
|
<FONT SIZE="-1">
|
|
calypso.util</FONT>
|
|
<BR>
|
|
Class AtomHashtable</H2>
|
|
<PRE>
|
|
java.lang.Object
|
|
|
|
|
+--calypso.util.HashtableBase
|
|
|
|
|
+--<B>calypso.util.AtomHashtable</B>
|
|
</PRE>
|
|
<HR>
|
|
<DL>
|
|
<DT>public class <B>AtomHashtable</B><DT>extends calypso.util.HashtableBase</DL>
|
|
|
|
<P>
|
|
Special hashtable that uses Atoms as keys. This extends HashtableBase to
|
|
expose a public Atom based api
|
|
This hastable uses identity comparisons on keys
|
|
<P>
|
|
<DL>
|
|
<DT><B>See Also: </B><DD></DL>
|
|
<HR>
|
|
|
|
<P>
|
|
<!-- ======== INNER CLASS SUMMARY ======== -->
|
|
|
|
|
|
<!-- =========== FIELD SUMMARY =========== -->
|
|
|
|
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
|
|
<A NAME="constructor_summary"><!-- --></A>
|
|
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
|
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
|
|
<TD COLSPAN=2><FONT SIZE="+2">
|
|
<B>Constructor Summary</B></FONT></TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD><CODE><B><A HREF="../../calypso/util/AtomHashtable.html#AtomHashtable()">AtomHashtable</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Constructs an empty Hashtable.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD><CODE><B><A HREF="../../calypso/util/AtomHashtable.html#AtomHashtable(int)">AtomHashtable</A></B>(int aInitialCapacity)</CODE>
|
|
|
|
<BR>
|
|
Constructs a Hashtable capable of holding at least
|
|
<b>initialCapacity</b> elements before needing to grow.</TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
|
|
<A NAME="method_summary"><!-- --></A>
|
|
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
|
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
|
|
<TD COLSPAN=2><FONT SIZE="+2">
|
|
<B>Method Summary</B></FONT></TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/AtomHashtable.html#contains(java.lang.Object)">contains</A></B>(java.lang.Object aElement)</CODE>
|
|
|
|
<BR>
|
|
Returns <b>true</b> if the Hashtable contains the element.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/AtomHashtable.html#containsKey(calypso.util.Atom)">containsKey</A></B>(<A HREF="../../calypso/util/Atom.html">Atom</A> aKey)</CODE>
|
|
|
|
<BR>
|
|
Returns <b>true</b> if the Hashtable contains the key <b>key</b>.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> java.lang.Object[]</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/AtomHashtable.html#elementsArray()">elementsArray</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Returns an Object array containing the Hashtable's elements.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> java.lang.Object</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/AtomHashtable.html#get(calypso.util.Atom)">get</A></B>(<A HREF="../../calypso/util/Atom.html">Atom</A> aKey)</CODE>
|
|
|
|
<BR>
|
|
Returns the element associated with the <b>key</b>.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/Atom.html">Atom</A>[]</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/AtomHashtable.html#keysArray()">keysArray</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Returns an Object array containing the Hashtable's keys.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> java.lang.Object</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/AtomHashtable.html#put(calypso.util.Atom, java.lang.Object)">put</A></B>(<A HREF="../../calypso/util/Atom.html">Atom</A> aKey,
|
|
java.lang.Object aElement)</CODE>
|
|
|
|
<BR>
|
|
Places the <b>key</b>/<b>element</b> pair in the Hashtable.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> java.lang.Object</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/AtomHashtable.html#remove(calypso.util.Atom)">remove</A></B>(<A HREF="../../calypso/util/Atom.html">Atom</A> aKey)</CODE>
|
|
|
|
<BR>
|
|
Removes <b>key</b> and the element associated with it from the
|
|
Hashtable.</TD>
|
|
</TR>
|
|
</TABLE>
|
|
<A NAME="methods_inherited_from_class_calypso.util.HashtableBase"><!-- --></A>
|
|
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
|
<TR BGCOLOR="#EEEEFF" ID="TableSubHeadingColor">
|
|
<TD><B>Methods inherited from class calypso.util.HashtableBase</B></TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD><CODE>clear,
|
|
clone,
|
|
count,
|
|
elements,
|
|
elementsVector,
|
|
grow,
|
|
isEmpty,
|
|
keys,
|
|
keysVector,
|
|
size,
|
|
toString</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" ID="TableSubHeadingColor">
|
|
<TD><B>Methods inherited from class java.lang.Object</B></TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD><CODE>equals,
|
|
finalize,
|
|
getClass,
|
|
hashCode,
|
|
notify,
|
|
notifyAll,
|
|
wait,
|
|
wait,
|
|
wait</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" ID="TableHeadingColor">
|
|
<TD COLSPAN=1><FONT SIZE="+2">
|
|
<B>Constructor Detail</B></FONT></TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<A NAME="AtomHashtable()"><!-- --></A><H3>
|
|
AtomHashtable</H3>
|
|
<PRE>
|
|
public <B>AtomHashtable</B>()</PRE>
|
|
<DL>
|
|
<DD>Constructs an empty Hashtable. The Hashtable will grow on demand
|
|
as more elements are added.</DL>
|
|
<HR>
|
|
|
|
<A NAME="AtomHashtable(int)"><!-- --></A><H3>
|
|
AtomHashtable</H3>
|
|
<PRE>
|
|
public <B>AtomHashtable</B>(int aInitialCapacity)</PRE>
|
|
<DL>
|
|
<DD>Constructs a Hashtable capable of holding at least
|
|
<b>initialCapacity</b> elements before needing to grow.</DL>
|
|
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
|
|
<A NAME="method_detail"><!-- --></A>
|
|
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
|
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
|
|
<TD COLSPAN=1><FONT SIZE="+2">
|
|
<B>Method Detail</B></FONT></TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<A NAME="keysArray()"><!-- --></A><H3>
|
|
keysArray</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/Atom.html">Atom</A>[] <B>keysArray</B>()</PRE>
|
|
<DL>
|
|
<DD>Returns an Object array containing the Hashtable's keys.</DL>
|
|
<HR>
|
|
|
|
<A NAME="elementsArray()"><!-- --></A><H3>
|
|
elementsArray</H3>
|
|
<PRE>
|
|
public java.lang.Object[] <B>elementsArray</B>()</PRE>
|
|
<DL>
|
|
<DD>Returns an Object array containing the Hashtable's elements.</DL>
|
|
<HR>
|
|
|
|
<A NAME="contains(java.lang.Object)"><!-- --></A><H3>
|
|
contains</H3>
|
|
<PRE>
|
|
public boolean <B>contains</B>(java.lang.Object aElement)</PRE>
|
|
<DL>
|
|
<DD>Returns <b>true</b> if the Hashtable contains the element. This method
|
|
is slow -- O(n) -- because it must scan the table searching for the
|
|
element.</DL>
|
|
<HR>
|
|
|
|
<A NAME="containsKey(calypso.util.Atom)"><!-- --></A><H3>
|
|
containsKey</H3>
|
|
<PRE>
|
|
public boolean <B>containsKey</B>(<A HREF="../../calypso/util/Atom.html">Atom</A> aKey)</PRE>
|
|
<DL>
|
|
<DD>Returns <b>true</b> if the Hashtable contains the key <b>key</b>.</DL>
|
|
<HR>
|
|
|
|
<A NAME="get(calypso.util.Atom)"><!-- --></A><H3>
|
|
get</H3>
|
|
<PRE>
|
|
public java.lang.Object <B>get</B>(<A HREF="../../calypso/util/Atom.html">Atom</A> aKey)</PRE>
|
|
<DL>
|
|
<DD>Returns the element associated with the <b>key</b>. This method returns
|
|
<b>null</b> if the Hashtable does not contain <b>key</b>. Hashtable
|
|
hashes and compares <b>key</b> using <b>hashCode()</b> and
|
|
<b>equals()</b>.</DL>
|
|
<HR>
|
|
|
|
<A NAME="remove(calypso.util.Atom)"><!-- --></A><H3>
|
|
remove</H3>
|
|
<PRE>
|
|
public java.lang.Object <B>remove</B>(<A HREF="../../calypso/util/Atom.html">Atom</A> aKey)</PRE>
|
|
<DL>
|
|
<DD>Removes <b>key</b> and the element associated with it from the
|
|
Hashtable. Returns the element associated with <b>key</b>, or
|
|
<b>null</b> if <b>key</b> was not present.</DL>
|
|
<HR>
|
|
|
|
<A NAME="put(calypso.util.Atom, java.lang.Object)"><!-- --></A><H3>
|
|
put</H3>
|
|
<PRE>
|
|
public java.lang.Object <B>put</B>(<A HREF="../../calypso/util/Atom.html">Atom</A> aKey,
|
|
java.lang.Object aElement)</PRE>
|
|
<DL>
|
|
<DD>Places the <b>key</b>/<b>element</b> pair in the Hashtable. Neither
|
|
<b>key</b> nor <b>element</b> may be <b>null</b>. Returns the old
|
|
element associated with <b>key</b>, or <b>null</b> if the <b>key</b>
|
|
was not present.</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" ID="NavBarCell1">
|
|
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
|
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
|
<TR ALIGN="center" VALIGN="top">
|
|
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#FFFFFF" ID="NavBarCell1Rev"> <FONT ID="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
|
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
|
</TR>
|
|
</TABLE>
|
|
</TD>
|
|
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
|
</EM>
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR>
|
|
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../calypso/util/Atom.html"><B>PREV CLASS</B></A>
|
|
<A HREF="../../calypso/util/AttributeValuePair.html"><B>NEXT CLASS</B></A></FONT></TD>
|
|
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>
|
|
<A HREF="AtomHashtable.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
|
|
</TR>
|
|
<TR>
|
|
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
|
|
SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
<TD VALIGN="top" ID="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>
|
|
|
|
</BODY>
|
|
</HTML>
|