@@ -0,0 +1,1577 @@
+/*%0A * Copyright 2014 Sebastian RODRIGUEZ, Nicolas GAUD, St%C3%A9phane GALLAND.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage io.sarl.core;%0A%0Aimport java.util.Set;%0A%0A/** A set that is synchronized (thread-safe).%0A * %3Cp%3E%0A * All the operations on the set are synchronized with an internal mutex,%0A * except %3Ccode%3Eiterator()%3C/code%3E.%0A * %3Cp%3E%0A * The iterator replies by this set must be synchronized by hand by%0A * the user of the iterator: %3Cpre%3E%3Ccode%3E%0A * SynchronizedSet%3CObject%3E c;%0A * synchronized(c.mutex()) %7B%0A *   Iterator%3CObject%3E iterator = c.iterator();%0A *   while (iterator.hasNext()) %7B%0A *     Object element = iterator.next();%0A *     // Do something with the element%0A *   %7D%0A * %7D%0A * %3C/code%3E%3C/pre%3E%0A * %0A * @param %3CE%3E - type of the elements in the set.%0A * @author $Author: sgalland$%0A * @version $FullVersion$%0A * @mavengroupid $GroupId$%0A * @mavenartifactid $ArtifactId$%0A */%0Apublic interface SynchronizedSet%3CE%3E extends Set%3CE%3E %7B%0A%0A%09/**%0A%09 * Replies the mutex that is used to synchronized the access to this set.%0A%09 * %0A%09 * @return the mutex%0A%09 */%0A%09public Object mutex();%0A%09%0A%7D%0A

Add the SynchronizedSet interface.