<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<!--NewPage--> | |
<HTML> | |
<HEAD> | |
<!-- Generated by javadoc (build 1.5.0) on Tue Nov 06 17:41:05 CST 2007 --> | |
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> | |
<TITLE> | |
CopyOnWriteArraySet (OpenJPA 1.0.1 API) | |
</TITLE> | |
<META NAME="keywords" CONTENT="org.apache.openjpa.lib.util.concurrent.CopyOnWriteArraySet class"> | |
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style"> | |
<SCRIPT type="text/javascript"> | |
function windowTitle() | |
{ | |
parent.document.title="CopyOnWriteArraySet (OpenJPA 1.0.1 API)"; | |
} | |
</SCRIPT> | |
<NOSCRIPT> | |
</NOSCRIPT> | |
</HEAD> | |
<BODY BGCOLOR="white" onload="windowTitle();"> | |
<!-- ========= START OF TOP NAVBAR ======= --> | |
<A NAME="navbar_top"><!-- --></A> | |
<A HREF="#skip-navbar_top" title="Skip navigation links"></A> | |
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> | |
<TR> | |
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> | |
<A NAME="navbar_top_firstrow"><!-- --></A> | |
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> | |
<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"> <A HREF="#main"><FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/CopyOnWriteArraySet.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-all.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> | |
</EM> | |
</TD> | |
</TR> | |
<TR> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/CopyOnWriteArrayList.html" title="class in org.apache.openjpa.lib.util.concurrent"><B>PREV CLASS</B></A> | |
<A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/Lock.html" title="interface in org.apache.openjpa.lib.util.concurrent"><B>NEXT CLASS</B></A></FONT></TD> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../../../index.html?org/apache/openjpa/lib/util/concurrent/CopyOnWriteArraySet.html" target="_top"><B>FRAMES</B></A> | |
<A HREF="CopyOnWriteArraySet.html" target="_top"><B>NO FRAMES</B></A> | |
<SCRIPT type="text/javascript"> | |
<!-- | |
if(window==top) { | |
document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); | |
} | |
//--> | |
</SCRIPT> | |
<NOSCRIPT> | |
<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A> | |
</NOSCRIPT> | |
</FONT></TD> | |
</TR> | |
<TR> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
SUMMARY: NESTED | 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> | |
<A NAME="skip-navbar_top"></A> | |
<!-- ========= END OF TOP NAVBAR ========= --> | |
<HR> | |
<A NAME="main"></A> | |
<!-- ======== START OF CLASS DATA ======== --> | |
<H2> | |
<FONT SIZE="-1"> | |
org.apache.openjpa.lib.util.concurrent</FONT> | |
<BR> | |
Class CopyOnWriteArraySet</H2> | |
<PRE> | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">java.lang.Object</A> | |
<IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html" title="class or interface in java.util">java.util.AbstractCollection</A><E> | |
<IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractSet.html" title="class or interface in java.util">java.util.AbstractSet</A> | |
<IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.openjpa.lib.util.concurrent.CopyOnWriteArraySet</B> | |
</PRE> | |
<DL> | |
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Serializable.html" title="class or interface in java.io">Serializable</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Iterable.html" title="class or interface in java.lang">Iterable</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html" title="class or interface in java.util">Set</A></DD> | |
</DL> | |
<HR> | |
<DL> | |
<DT><PRE>public class <B>CopyOnWriteArraySet</B><DT>extends <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractSet.html" title="class or interface in java.util">AbstractSet</A><DT>implements <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Serializable.html" title="class or interface in java.io">Serializable</A></DL> | |
</PRE> | |
<P> | |
A <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html" title="class or interface in java.util"><CODE>Set</CODE></A> that uses an internal <A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/CopyOnWriteArrayList.html" title="class in org.apache.openjpa.lib.util.concurrent"><CODE>CopyOnWriteArrayList</CODE></A> | |
for all of its operations. Thus, it shares the same basic properties: | |
<ul> | |
<li>It is best suited for applications in which set sizes generally | |
stay small, read-only operations | |
vastly outnumber mutative operations, and you need | |
to prevent interference among threads during traversal. | |
<li>It is thread-safe. | |
<li>Mutative operations(<tt>add</tt>, <tt>set</tt>, <tt>remove</tt>, etc.) | |
are expensive since they usually entail copying the entire underlying array. | |
<li>Iterators do not support the mutative <tt>remove</tt> operation. | |
<li>Traversal via iterators is fast and cannot encounter | |
interference from other threads. Iterators rely on | |
unchanging snapshots of the array at the time the iterators were constructed. | |
</ul> | |
<b>Sample Usage.</b> The following code sketch uses a | |
copy-on-write set to maintain a set of Handler objects that | |
perform some action upon state updates. | |
<pre> class Handler { void handle(); ... } | |
class X { private final CopyOnWriteArraySet<Handler> handlers | |
= new CopyOnWriteArraySet<Handler>(); | |
public void addHandler(Handler h) { handlers.add(h); } | |
private long internalState; | |
private synchronized void changeState() { internalState = ...; } | |
public void update() { changeState(); for (Handler handler : handlers) | |
handler.handle(); } } | |
</pre> This class is a member of the | |
<a href="../../../../../../../guide/collections/index.html"> | |
Java Collections Framework</a>. | |
<P> | |
<P> | |
<DL> | |
<DT><B>Since:</B></DT> | |
<DD>1.5</DD> | |
<DT><B>Author:</B></DT> | |
<DD>Doug Lea</DD> | |
<DT><B>See Also:</B><DD><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/CopyOnWriteArrayList.html" title="class in org.apache.openjpa.lib.util.concurrent"><CODE>CopyOnWriteArrayList</CODE></A>, | |
<A HREF="../../../../../../serialized-form.html#org.apache.openjpa.lib.util.concurrent.CopyOnWriteArraySet">Serialized Form</A></DL> | |
<HR> | |
<P> | |
<!-- ======== CONSTRUCTOR SUMMARY ======== --> | |
<A NAME="constructor_summary"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> | |
<B>Constructor Summary</B></FONT></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/CopyOnWriteArraySet.html#CopyOnWriteArraySet()">CopyOnWriteArraySet</A></B>()</CODE> | |
<BR> | |
Creates an empty set.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/CopyOnWriteArraySet.html#CopyOnWriteArraySet(java.util.Collection)">CopyOnWriteArraySet</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A> c)</CODE> | |
<BR> | |
Creates a set containing all of the elements of the specified collection.</TD> | |
</TR> | |
</TABLE> | |
| |
<!-- ========== METHOD SUMMARY =========== --> | |
<A NAME="method_summary"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> | |
<B>Method Summary</B></FONT></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/CopyOnWriteArraySet.html#add(java.lang.Object)">add</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> e)</CODE> | |
<BR> | |
Adds the specified element to this set if it is not already present.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/CopyOnWriteArraySet.html#addAll(java.util.Collection)">addAll</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A> c)</CODE> | |
<BR> | |
Adds all of the elements in the specified collection to this set if | |
they're not already present.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/CopyOnWriteArraySet.html#clear()">clear</A></B>()</CODE> | |
<BR> | |
Removes all of the elements from this set.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/CopyOnWriteArraySet.html#contains(java.lang.Object)">contains</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> o)</CODE> | |
<BR> | |
Returns <tt>true</tt> if this set contains the specified element.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/CopyOnWriteArraySet.html#containsAll(java.util.Collection)">containsAll</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A> c)</CODE> | |
<BR> | |
Returns <tt>true</tt> if this set contains all of the elements of the | |
specified collection.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/CopyOnWriteArraySet.html#equals(java.lang.Object)">equals</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> o)</CODE> | |
<BR> | |
Compares the specified object with this set for equality.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/CopyOnWriteArraySet.html#isEmpty()">isEmpty</A></B>()</CODE> | |
<BR> | |
Returns <tt>true</tt> if this set contains no elements.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/CopyOnWriteArraySet.html#iterator()">iterator</A></B>()</CODE> | |
<BR> | |
Returns an iterator over the elements contained in this set | |
in the order in which these elements were added.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/CopyOnWriteArraySet.html#remove(java.lang.Object)">remove</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> o)</CODE> | |
<BR> | |
Removes the specified element from this set if it is present.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/CopyOnWriteArraySet.html#removeAll(java.util.Collection)">removeAll</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A> c)</CODE> | |
<BR> | |
Removes from this set all of its elements that are contained in the | |
specified collection.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/CopyOnWriteArraySet.html#retainAll(java.util.Collection)">retainAll</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A> c)</CODE> | |
<BR> | |
Retains only the elements in this set that are contained in the | |
specified collection.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> int</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/CopyOnWriteArraySet.html#size()">size</A></B>()</CODE> | |
<BR> | |
Returns the number of elements in this set.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>[]</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/CopyOnWriteArraySet.html#toArray()">toArray</A></B>()</CODE> | |
<BR> | |
Returns an array containing all of the elements in this set.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>[]</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/CopyOnWriteArraySet.html#toArray(java.lang.Object[])">toArray</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>[] a)</CODE> | |
<BR> | |
Returns an array containing all of the elements in this set; the | |
runtime type of the returned array is that of the specified array.</TD> | |
</TR> | |
</TABLE> | |
<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>Methods inherited from class java.util.<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractSet.html" title="class or interface in java.util">AbstractSet</A></B></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractSet.html#hashCode()" title="class or interface in java.util">hashCode</A></CODE></TD> | |
</TR> | |
</TABLE> | |
<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>Methods inherited from class java.util.<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html" title="class or interface in java.util">AbstractCollection</A></B></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html#toString()" title="class or interface in java.util">toString</A></CODE></TD> | |
</TR> | |
</TABLE> | |
<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>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD> | |
</TR> | |
</TABLE> | |
| |
<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>Constructor Detail</B></FONT></TH> | |
</TR> | |
</TABLE> | |
<A NAME="CopyOnWriteArraySet()"><!-- --></A><H3> | |
CopyOnWriteArraySet</H3> | |
<PRE> | |
public <B>CopyOnWriteArraySet</B>()</PRE> | |
<DL> | |
<DD>Creates an empty set. | |
<P> | |
</DL> | |
<HR> | |
<A NAME="CopyOnWriteArraySet(java.util.Collection)"><!-- --></A><H3> | |
CopyOnWriteArraySet</H3> | |
<PRE> | |
public <B>CopyOnWriteArraySet</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A> c)</PRE> | |
<DL> | |
<DD>Creates a set containing all of the elements of the specified collection. | |
<P> | |
<DL> | |
<DT><B>Parameters:</B><DD><CODE>c</CODE> - the collection of elements to initially contain | |
<DT><B>Throws:</B> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if the specified collection is null</DL> | |
</DL> | |
<!-- ============ METHOD DETAIL ========== --> | |
<A NAME="method_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>Method Detail</B></FONT></TH> | |
</TR> | |
</TABLE> | |
<A NAME="size()"><!-- --></A><H3> | |
size</H3> | |
<PRE> | |
public int <B>size</B>()</PRE> | |
<DL> | |
<DD>Returns the number of elements in this set. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html#size()" title="class or interface in java.util">size</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html#size()" title="class or interface in java.util">size</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html" title="class or interface in java.util">Set</A></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html#size()" title="class or interface in java.util">size</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html" title="class or interface in java.util">AbstractCollection</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the number of elements in this set</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="isEmpty()"><!-- --></A><H3> | |
isEmpty</H3> | |
<PRE> | |
public boolean <B>isEmpty</B>()</PRE> | |
<DL> | |
<DD>Returns <tt>true</tt> if this set contains no elements. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html#isEmpty()" title="class or interface in java.util">isEmpty</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html#isEmpty()" title="class or interface in java.util">isEmpty</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html" title="class or interface in java.util">Set</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html#isEmpty()" title="class or interface in java.util">isEmpty</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html" title="class or interface in java.util">AbstractCollection</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD><tt>true</tt> if this set contains no elements</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="contains(java.lang.Object)"><!-- --></A><H3> | |
contains</H3> | |
<PRE> | |
public boolean <B>contains</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> o)</PRE> | |
<DL> | |
<DD>Returns <tt>true</tt> if this set contains the specified element. | |
More formally, returns <tt>true</tt> if and only if this set | |
contains an element <tt>e</tt> such that | |
<tt>(o==null ? e==null : o.equals(e))</tt>. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html#contains(java.lang.Object)" title="class or interface in java.util">contains</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html#contains(java.lang.Object)" title="class or interface in java.util">contains</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html" title="class or interface in java.util">Set</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html#contains(java.lang.Object)" title="class or interface in java.util">contains</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html" title="class or interface in java.util">AbstractCollection</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>o</CODE> - element whose presence in this set is to be tested | |
<DT><B>Returns:</B><DD><tt>true</tt> if this set contains the specified element</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="toArray()"><!-- --></A><H3> | |
toArray</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>[] <B>toArray</B>()</PRE> | |
<DL> | |
<DD>Returns an array containing all of the elements in this set. | |
If this set makes any guarantees as to what order its elements | |
are returned by its iterator, this method must return the | |
elements in the same order. | |
The returned array will be "safe" in that no references to it | |
are maintained by this set. (In other words, this method must | |
allocate a new array even if this set is backed by an array). | |
The caller is thus free to modify the returned array. | |
This method acts as bridge between array-based and collection-based APIs. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html#toArray()" title="class or interface in java.util">toArray</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html#toArray()" title="class or interface in java.util">toArray</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html" title="class or interface in java.util">Set</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>an array containing all the elements in this set</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="toArray(java.lang.Object[])"><!-- --></A><H3> | |
toArray</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>[] <B>toArray</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>[] a)</PRE> | |
<DL> | |
<DD>Returns an array containing all of the elements in this set; the | |
runtime type of the returned array is that of the specified array. | |
If the set fits in the specified array, it is returned therein. | |
Otherwise, a new array is allocated with the runtime type of the | |
specified array and the size of this set. | |
If this set fits in the specified array with room to spare | |
(i.e., the array has more elements than this set), the element in | |
the array immediately following the end of the set is set to | |
<tt>null</tt>. (This is useful in determining the length of this | |
set <i>only</i> if the caller knows that this set does not contain | |
any null elements.) | |
If this set makes any guarantees as to what order its elements | |
are returned by its iterator, this method must return the elements | |
in the same order. | |
Like the <A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/CopyOnWriteArraySet.html#toArray()"><CODE>toArray()</CODE></A> method, this method acts as bridge between | |
array-based and collection-based APIs. Further, this method allows | |
precise control over the runtime type of the output array, and may, | |
under certain circumstances, be used to save allocation costs. | |
Suppose <tt>x</tt> is a set known to contain only strings. | |
The following code can be used to dump the set into a newly allocated | |
array of <tt>String</tt>: | |
<pre> String[] y = x.toArray(new String[0]);</pre> | |
Note that <tt>toArray(new Object[0])</tt> is identical in function to | |
<tt>toArray()</tt>. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html#toArray(T[])" title="class or interface in java.util">toArray</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html#toArray(T[])" title="class or interface in java.util">toArray</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html" title="class or interface in java.util">Set</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>a</CODE> - the array into which the elements of this set are to be | |
stored, if it is big enough; otherwise, a new array of the same | |
runtime type is allocated for this purpose. | |
<DT><B>Returns:</B><DD>an array containing all the elements in this set | |
<DT><B>Throws:</B> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ArrayStoreException.html" title="class or interface in java.lang">ArrayStoreException</A></CODE> - if the runtime type of the specified array | |
is not a supertype of the runtime type of every element in this set | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if the specified array is null</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="clear()"><!-- --></A><H3> | |
clear</H3> | |
<PRE> | |
public void <B>clear</B>()</PRE> | |
<DL> | |
<DD>Removes all of the elements from this set. | |
The set will be empty after this call returns. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html#clear()" title="class or interface in java.util">clear</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html#clear()" title="class or interface in java.util">clear</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html" title="class or interface in java.util">Set</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html#clear()" title="class or interface in java.util">clear</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html" title="class or interface in java.util">AbstractCollection</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="remove(java.lang.Object)"><!-- --></A><H3> | |
remove</H3> | |
<PRE> | |
public boolean <B>remove</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> o)</PRE> | |
<DL> | |
<DD>Removes the specified element from this set if it is present. | |
More formally, removes an element <tt>e</tt> such that | |
<tt>(o==null ? e==null : o.equals(e))</tt>, | |
if this set contains such an element. Returns <tt>true</tt> if | |
this set contained the element(or equivalently, if this set | |
changed as a result of the call). (This set will not contain the | |
element once the call returns.) | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html#remove(java.lang.Object)" title="class or interface in java.util">remove</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html#remove(java.lang.Object)" title="class or interface in java.util">remove</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html" title="class or interface in java.util">Set</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html#remove(java.lang.Object)" title="class or interface in java.util">remove</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html" title="class or interface in java.util">AbstractCollection</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>o</CODE> - object to be removed from this set, if present | |
<DT><B>Returns:</B><DD><tt>true</tt> if this set contained the specified element</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="add(java.lang.Object)"><!-- --></A><H3> | |
add</H3> | |
<PRE> | |
public boolean <B>add</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> e)</PRE> | |
<DL> | |
<DD>Adds the specified element to this set if it is not already present. | |
More formally, adds the specified element <tt>e</tt> to this set if | |
the set contains no element <tt>e2</tt> such that | |
<tt>(e==null ? e2==null : e.equals(e2))</tt>. | |
If this set already contains the element, the call leaves the set | |
unchanged and returns <tt>false</tt>. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html#add(E)" title="class or interface in java.util">add</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html#add(E)" title="class or interface in java.util">add</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html" title="class or interface in java.util">Set</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html#add(E)" title="class or interface in java.util">add</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html" title="class or interface in java.util">AbstractCollection</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>e</CODE> - element to be added to this set | |
<DT><B>Returns:</B><DD><tt>true</tt> if this set did not already contain the specified | |
element</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="containsAll(java.util.Collection)"><!-- --></A><H3> | |
containsAll</H3> | |
<PRE> | |
public boolean <B>containsAll</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A> c)</PRE> | |
<DL> | |
<DD>Returns <tt>true</tt> if this set contains all of the elements of the | |
specified collection. If the specified collection is also a set, this | |
method returns <tt>true</tt> if it is a <i>subset</i> of this set. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html#containsAll(java.util.Collection)" title="class or interface in java.util">containsAll</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html#containsAll(java.util.Collection)" title="class or interface in java.util">containsAll</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html" title="class or interface in java.util">Set</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html#containsAll(java.util.Collection)" title="class or interface in java.util">containsAll</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html" title="class or interface in java.util">AbstractCollection</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>c</CODE> - collection to be checked for containment in this set | |
<DT><B>Returns:</B><DD><tt>true</tt> if this set contains all of the elements of the | |
specified collection | |
<DT><B>Throws:</B> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if the specified collection is null<DT><B>See Also:</B><DD><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/CopyOnWriteArraySet.html#contains(java.lang.Object)"><CODE>contains(Object)</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="addAll(java.util.Collection)"><!-- --></A><H3> | |
addAll</H3> | |
<PRE> | |
public boolean <B>addAll</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A> c)</PRE> | |
<DL> | |
<DD>Adds all of the elements in the specified collection to this set if | |
they're not already present. If the specified collection is also a | |
set, the <tt>addAll</tt> operation effectively modifies this set so | |
that its value is the <i>union</i> of the two sets. The behavior of | |
this operation is undefined if the specified collection is modified | |
while the operation is in progress. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html#addAll(java.util.Collection)" title="class or interface in java.util">addAll</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html#addAll(java.util.Collection)" title="class or interface in java.util">addAll</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html" title="class or interface in java.util">Set</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html#addAll(java.util.Collection)" title="class or interface in java.util">addAll</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html" title="class or interface in java.util">AbstractCollection</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>c</CODE> - collection containing elements to be added to this set | |
<DT><B>Returns:</B><DD><tt>true</tt> if this set changed as a result of the call | |
<DT><B>Throws:</B> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if the specified collection is null<DT><B>See Also:</B><DD><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/CopyOnWriteArraySet.html#add(java.lang.Object)"><CODE>add(Object)</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="removeAll(java.util.Collection)"><!-- --></A><H3> | |
removeAll</H3> | |
<PRE> | |
public boolean <B>removeAll</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A> c)</PRE> | |
<DL> | |
<DD>Removes from this set all of its elements that are contained in the | |
specified collection. If the specified collection is also a set, | |
this operation effectively modifies this set so that its value is the | |
<i>asymmetric set difference</i> of the two sets. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html#removeAll(java.util.Collection)" title="class or interface in java.util">removeAll</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html#removeAll(java.util.Collection)" title="class or interface in java.util">removeAll</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html" title="class or interface in java.util">Set</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractSet.html#removeAll(java.util.Collection)" title="class or interface in java.util">removeAll</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractSet.html" title="class or interface in java.util">AbstractSet</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>c</CODE> - collection containing elements to be removed from this set | |
<DT><B>Returns:</B><DD><tt>true</tt> if this set changed as a result of the call | |
<DT><B>Throws:</B> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ClassCastException.html" title="class or interface in java.lang">ClassCastException</A></CODE> - if the class of an element of this set | |
is incompatible with the specified collection(optional) | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if this set contains a null element and the | |
specified collection does not permit null elements(optional), | |
or if the specified collection is null<DT><B>See Also:</B><DD><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/CopyOnWriteArraySet.html#remove(java.lang.Object)"><CODE>remove(Object)</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="retainAll(java.util.Collection)"><!-- --></A><H3> | |
retainAll</H3> | |
<PRE> | |
public boolean <B>retainAll</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A> c)</PRE> | |
<DL> | |
<DD>Retains only the elements in this set that are contained in the | |
specified collection. In other words, removes from this set all of | |
its elements that are not contained in the specified collection. If | |
the specified collection is also a set, this operation effectively | |
modifies this set so that its value is the <i>intersection</i> of the | |
two sets. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html#retainAll(java.util.Collection)" title="class or interface in java.util">retainAll</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html#retainAll(java.util.Collection)" title="class or interface in java.util">retainAll</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html" title="class or interface in java.util">Set</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html#retainAll(java.util.Collection)" title="class or interface in java.util">retainAll</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html" title="class or interface in java.util">AbstractCollection</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>c</CODE> - collection containing elements to be retained in this set | |
<DT><B>Returns:</B><DD><tt>true</tt> if this set changed as a result of the call | |
<DT><B>Throws:</B> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ClassCastException.html" title="class or interface in java.lang">ClassCastException</A></CODE> - if the class of an element of this set | |
is incompatible with the specified collection(optional) | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if this set contains a null element and the | |
specified collection does not permit null elements(optional), | |
or if the specified collection is null<DT><B>See Also:</B><DD><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/CopyOnWriteArraySet.html#remove(java.lang.Object)"><CODE>remove(Object)</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="iterator()"><!-- --></A><H3> | |
iterator</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A> <B>iterator</B>()</PRE> | |
<DL> | |
<DD>Returns an iterator over the elements contained in this set | |
in the order in which these elements were added. | |
The returned iterator provides a snapshot of the state of the set | |
when the iterator was constructed. No synchronization is needed while | |
traversing the iterator. The iterator does <em>NOT</em> support the | |
<tt>remove</tt> method. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Iterable.html#iterator()" title="class or interface in java.lang">iterator</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Iterable.html" title="class or interface in java.lang">Iterable</A></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html#iterator()" title="class or interface in java.util">iterator</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html#iterator()" title="class or interface in java.util">iterator</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html" title="class or interface in java.util">Set</A></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html#iterator()" title="class or interface in java.util">iterator</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html" title="class or interface in java.util">AbstractCollection</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>an iterator over the elements in this set</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="equals(java.lang.Object)"><!-- --></A><H3> | |
equals</H3> | |
<PRE> | |
public boolean <B>equals</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> o)</PRE> | |
<DL> | |
<DD>Compares the specified object with this set for equality. | |
Returns <code>true</code> if the specified object is the same object | |
as this object, or if it is also a <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html" title="class or interface in java.util"><CODE>Set</CODE></A> and the elements | |
returned by an <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html#iterator()" title="class or interface in java.util">iterator</A> over the | |
specified set are the same as the elements returned by an | |
iterator over this set. More formally, the two iterators are | |
considered to return the same elements if they return the same | |
number of elements and for every element <code>e1</code> returned by | |
the iterator over the specified set, there is an element | |
<code>e2</code> returned by the iterator over this set such that | |
. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html#equals(java.lang.Object)" title="class or interface in java.util">equals</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html#equals(java.lang.Object)" title="class or interface in java.util">equals</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html" title="class or interface in java.util">Set</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractSet.html#equals(java.lang.Object)" title="class or interface in java.util">equals</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractSet.html" title="class or interface in java.util">AbstractSet</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>o</CODE> - object to be compared for equality with this set | |
<DT><B>Returns:</B><DD><code>true</code> if the specified object is equal to this set</DL> | |
</DD> | |
</DL> | |
<!-- ========= END OF CLASS DATA ========= --> | |
<HR> | |
<!-- ======= START OF BOTTOM NAVBAR ====== --> | |
<A NAME="navbar_bottom"><!-- --></A> | |
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> | |
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> | |
<TR> | |
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> | |
<A NAME="navbar_bottom_firstrow"><!-- --></A> | |
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> | |
<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"> <A HREF="#main"><FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/CopyOnWriteArraySet.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-all.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> | |
</EM> | |
</TD> | |
</TR> | |
<TR> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/CopyOnWriteArrayList.html" title="class in org.apache.openjpa.lib.util.concurrent"><B>PREV CLASS</B></A> | |
<A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/Lock.html" title="interface in org.apache.openjpa.lib.util.concurrent"><B>NEXT CLASS</B></A></FONT></TD> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../../../index.html?org/apache/openjpa/lib/util/concurrent/CopyOnWriteArraySet.html" target="_top"><B>FRAMES</B></A> | |
<A HREF="CopyOnWriteArraySet.html" target="_top"><B>NO FRAMES</B></A> | |
<SCRIPT type="text/javascript"> | |
<!-- | |
if(window==top) { | |
document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); | |
} | |
//--> | |
</SCRIPT> | |
<NOSCRIPT> | |
<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A> | |
</NOSCRIPT> | |
</FONT></TD> | |
</TR> | |
<TR> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
SUMMARY: NESTED | 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> | |
<A NAME="skip-navbar_bottom"></A> | |
<!-- ======== END OF BOTTOM NAVBAR ======= --> | |
<HR> | |
Copyright © 2006-2007 <a href="http://www.apache.org">Apache Software Foundation</a>. All Rights Reserved. | |
</BODY> | |
</HTML> |