/** * Returns a synchronized collection backed by the given collection. * <p> * You must manually synchronize on the returned buffer's iterator to * avoid non-deterministic behavior: * * <pre> * Collection c = CollectionUtils.synchronizedCollection(myCollection); * synchronized (c) { * Iterator i = c.iterator(); * while (i.hasNext()) { * process (i.next()); * } * } * </pre> * * This method uses the implementation in the decorators subpackage. * * @param collection the collection to synchronize, must not be null * @return a synchronized collection backed by the given collection * @throws IllegalArgumentException if the collection is null */ public static Collection synchronizedCollection(Collection collection) { return SynchronizedCollection.decorate(collection); }
/** * Factory method to create a synchronized collection. * * @param coll the collection to decorate, must not be null * @return a new synchronized collection * @throws IllegalArgumentException if collection is null */ public static Collection decorate(Collection coll) { return new SynchronizedCollection(coll); }
/** * Returns a synchronized collection backed by the given collection. * <p> * You must manually synchronize on the returned buffer's iterator to * avoid non-deterministic behavior: * * <pre> * Collection c = CollectionUtils.synchronizedCollection(myCollection); * synchronized (c) { * Iterator i = c.iterator(); * while (i.hasNext()) { * process (i.next()); * } * } * </pre> * * This method uses the implementation in the decorators subpackage. * * @param collection the collection to synchronize, must not be null * @return a synchronized collection backed by the given collection * @throws IllegalArgumentException if the collection is null */ public static Collection synchronizedCollection(Collection collection) { return SynchronizedCollection.decorate(collection); }
/** * Factory method to create a synchronized collection. * * @param coll the collection to decorate, must not be null * @return a new synchronized collection * @throws IllegalArgumentException if collection is null */ public static Collection decorate(Collection coll) { return new SynchronizedCollection(coll); }
public Collection makeCollection() { return SynchronizedCollection.decorate(new ArrayList()); }
/** * Factory method to create a synchronized collection. * * @param coll the collection to decorate, must not be null * @return a new synchronized collection * @throws IllegalArgumentException if collection is null */ public static Collection decorate(Collection coll) { return new SynchronizedCollection(coll); }
/** * Returns a synchronized collection backed by the given collection. * <p> * You must manually synchronize on the returned buffer's iterator to * avoid non-deterministic behavior: * * <pre> * Collection c = CollectionUtils.synchronizedCollection(myCollection); * synchronized (c) { * Iterator i = c.iterator(); * while (i.hasNext()) { * process (i.next()); * } * } * </pre> * * This method uses the implementation in the decorators subpackage. * * @param collection the collection to synchronize, must not be null * @return a synchronized collection backed by the given collection * @throws IllegalArgumentException if the collection is null */ public static Collection synchronizedCollection(Collection collection) { return SynchronizedCollection.decorate(collection); }
/** * Factory method to create a synchronized collection. * * @param coll the collection to decorate, must not be null * @return a new synchronized collection * @throws IllegalArgumentException if collection is null */ public static Collection decorate(Collection coll) { return new SynchronizedCollection(coll); }
/** * Returns a synchronized collection backed by the given collection. * <p> * You must manually synchronize on the returned buffer's iterator to * avoid non-deterministic behavior: * * <pre> * Collection c = CollectionUtils.synchronizedCollection(myCollection); * synchronized (c) { * Iterator i = c.iterator(); * while (i.hasNext()) { * process (i.next()); * } * } * </pre> * * This method uses the implementation in the decorators subpackage. * * @param collection the collection to synchronize, must not be null * @return a synchronized collection backed by the given collection * @throws IllegalArgumentException if the collection is null */ public static Collection synchronizedCollection(Collection collection) { return SynchronizedCollection.decorate(collection); }
/** * Factory method to create a synchronized collection. * * @param coll the collection to decorate, must not be null * @return a new synchronized collection * @throws IllegalArgumentException if collection is null */ public static Collection decorate(Collection coll) { return new SynchronizedCollection(coll); }
/** * Returns a synchronized collection backed by the given collection. * <p> * You must manually synchronize on the returned buffer's iterator to * avoid non-deterministic behavior: * * <pre> * Collection c = CollectionUtils.synchronizedCollection(myCollection); * synchronized (c) { * Iterator i = c.iterator(); * while (i.hasNext()) { * process (i.next()); * } * } * </pre> * * This method uses the implementation in the decorators subpackage. * * @param collection the collection to synchronize, must not be null * @return a synchronized collection backed by the given collection * @throws IllegalArgumentException if the collection is null */ public static Collection synchronizedCollection(Collection collection) { return SynchronizedCollection.decorate(collection); }
/** * Factory method to create a synchronized collection. * * @param coll the collection to decorate, must not be null * @return a new synchronized collection * @throws IllegalArgumentException if collection is null */ public static Collection decorate(Collection coll) { return new SynchronizedCollection(coll); }
/** * Returns a synchronized collection backed by the given collection. * <p> * You must manually synchronize on the returned buffer's iterator to * avoid non-deterministic behavior: * * <pre> * Collection c = CollectionUtils.synchronizedCollection(myCollection); * synchronized (c) { * Iterator i = c.iterator(); * while (i.hasNext()) { * process (i.next()); * } * } * </pre> * * This method uses the implementation in the decorators subpackage. * * @param collection the collection to synchronize, must not be null * @return a synchronized collection backed by the given collection * @throws IllegalArgumentException if the collection is null */ public static Collection synchronizedCollection(Collection collection) { return SynchronizedCollection.decorate(collection); }
/** * Factory method to create a synchronized collection. * * @param coll the collection to decorate, must not be null * @return a new synchronized collection * @throws IllegalArgumentException if collection is null */ public static Collection decorate(Collection coll) { return new SynchronizedCollection(coll); }
/** * Returns a synchronized collection backed by the given collection. * <p> * You must manually synchronize on the returned buffer's iterator to * avoid non-deterministic behavior: * * <pre> * Collection c = CollectionUtils.synchronizedCollection(myCollection); * synchronized (c) { * Iterator i = c.iterator(); * while (i.hasNext()) { * process (i.next()); * } * } * </pre> * * This method uses the implementation in the decorators subpackage. * * @param collection the collection to synchronize, must not be null * @return a synchronized collection backed by the given collection * @throws IllegalArgumentException if the collection is null */ public static Collection synchronizedCollection(Collection collection) { return SynchronizedCollection.decorate(collection); }
/** * Returns a synchronized collection backed by the given collection. * <p> * You must manually synchronize on the returned buffer's iterator to * avoid non-deterministic behavior: * * <pre> * Collection c = CollectionUtils.synchronizedCollection(myCollection); * synchronized (c) { * Iterator i = c.iterator(); * while (i.hasNext()) { * process (i.next()); * } * } * </pre> * * This method uses the implementation in the decorators subpackage. * * @param collection the collection to synchronize, must not be null * @return a synchronized collection backed by the given collection * @throws IllegalArgumentException if the collection is null */ public static Collection synchronizedCollection(Collection collection) { return SynchronizedCollection.decorate(collection); }
/** * Returns a synchronized collection backed by the given collection. * <p> * You must manually synchronize on the returned buffer's iterator to * avoid non-deterministic behavior: * * <pre> * Collection c = CollectionUtils.synchronizedCollection(myCollection); * synchronized (c) { * Iterator i = c.iterator(); * while (i.hasNext()) { * process (i.next()); * } * } * </pre> * * This method uses the implementation in the decorators subpackage. * * @param collection the collection to synchronize, must not be null * @return a synchronized collection backed by the given collection * @throws IllegalArgumentException if the collection is null */ public static Collection synchronizedCollection(Collection collection) { return SynchronizedCollection.decorate(collection); }