1 |
– |
|
1 |
|
/* |
2 |
|
* Written by Doug Lea with assistance from members of JCP JSR-166 |
3 |
|
* Expert Group and released to the public domain, as explained at |
9 |
|
import java.io.*; |
10 |
|
|
11 |
|
public final class SynchronizedCollection<E> implements Collection<E>, Serializable { |
12 |
< |
final Collection<E> c; // Backing Collection |
13 |
< |
final Object mutex; // Object on which to synchronize |
12 |
> |
final Collection<E> c; // Backing Collection |
13 |
> |
final Object mutex; // Object on which to synchronize |
14 |
|
|
15 |
|
public SynchronizedCollection(Collection<E> c) { |
16 |
|
if (c==null) |