copyonwritearrayset.html

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

HTML
697
字号
<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;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="CopyOnWriteArraySet.html#add(E)">add</A></B>(<A HREF="CopyOnWriteArraySet.html" title="CopyOnWriteArraySet 中的类型参数">E</A>&nbsp;o)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;确保此 collection 包含指定的元素(可选操作)。</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="CopyOnWriteArraySet.html#addAll(java.util.Collection)">addAll</A></B>(<A HREF="../Collection.html" title="java.util 中的接口">Collection</A>&lt;? extends <A HREF="CopyOnWriteArraySet.html" title="CopyOnWriteArraySet 中的类型参数">E</A>&gt;&nbsp;c)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;将指定 collection 中的所有元素添加到此 collection 中(可选操作)。</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="CopyOnWriteArraySet.html#clear()">clear</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;从此 collection 中移除所有元素(可选操作)。</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="CopyOnWriteArraySet.html#contains(java.lang.Object)">contains</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;如果此 collection 包含指定的元素,则返回 <tt>true</tt>。</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="CopyOnWriteArraySet.html#containsAll(java.util.Collection)">containsAll</A></B>(<A HREF="../Collection.html" title="java.util 中的接口">Collection</A>&lt;?&gt;&nbsp;c)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;如果此 collection 包含指定 collection 中的所有元素,则返回 <tt>true</tt>。</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="CopyOnWriteArraySet.html#isEmpty()">isEmpty</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;如果此 collection 不包含元素,则返回 <tt>true</tt>。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../Iterator.html" title="java.util 中的接口">Iterator</A>&lt;<A HREF="CopyOnWriteArraySet.html" title="CopyOnWriteArraySet 中的类型参数">E</A>&gt;</CODE></FONT></TD><TD><CODE><B><A HREF="CopyOnWriteArraySet.html#iterator()">iterator</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回在此 collection 中的元素上进行迭代的迭代器。</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="CopyOnWriteArraySet.html#remove(java.lang.Object)">remove</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;从此 collection 中移除指定元素的单个实例(如果存在)(可选操作)。</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="CopyOnWriteArraySet.html#removeAll(java.util.Collection)">removeAll</A></B>(<A HREF="../Collection.html" title="java.util 中的接口">Collection</A>&lt;?&gt;&nbsp;c)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;从此 set 中移除包含在指定 collection 中的所有元素(可选操作)。</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="CopyOnWriteArraySet.html#retainAll(java.util.Collection)">retainAll</A></B>(<A HREF="../Collection.html" title="java.util 中的接口">Collection</A>&lt;?&gt;&nbsp;c)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;仅在此 collection 中保留指定 collection 中所包含的元素(可选操作)。</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="CopyOnWriteArraySet.html#size()">size</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回此 collection 中的元素数。</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="CopyOnWriteArraySet.html#toArray()">toArray</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回包含此 collection 中所有元素的数组。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""><TR ALIGN="right" VALIGN=""><TD NOWRAP><FONT SIZE="-1"><CODE>&lt;T&gt; T[]</CODE></FONT></TD></TR></TABLE></CODE></FONT></TD><TD><CODE><B><A HREF="CopyOnWriteArraySet.html#toArray(T[])">toArray</A></B>(T[]&nbsp;a)</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.AbstractSet"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>从类 java.util.<A HREF="../AbstractSet.html" title="java.util 中的类">AbstractSet</A> 继承的方法</B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../AbstractSet.html#equals(java.lang.Object)">equals</A>, <A HREF="../AbstractSet.html#hashCode()">hashCode</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.util.AbstractCollection"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>从类 java.util.<A HREF="../AbstractCollection.html" title="java.util 中的类">AbstractCollection</A> 继承的方法</B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../AbstractCollection.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#clone()">clone</A>, <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="CopyOnWriteArraySet()"><!-- --></A><H3>CopyOnWriteArraySet</H3><PRE>public <B>CopyOnWriteArraySet</B>()</PRE><DL><DD>创建一个空 set。<P></DL><HR><A NAME="CopyOnWriteArraySet(java.util.Collection)"><!-- --></A><H3>CopyOnWriteArraySet</H3><PRE>public <B>CopyOnWriteArraySet</B>(<A HREF="../Collection.html" title="java.util 中的接口">Collection</A>&lt;? extends <A HREF="CopyOnWriteArraySet.html" title="CopyOnWriteArraySet 中的类型参数">E</A>&gt;&nbsp;c)</PRE><DL><DD>创建一个包含指定 Collection 中所有元素的 set。<P><DL>

⌨️ 快捷键说明

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