# | Line 17 | Line 17 | import java.util.concurrent.locks.*; | |
---|---|---|
17 | public final class RWCollection<E> implements Collection<E> { | |
18 | private final Collection c; | |
19 | private final ReentrantReadWriteLock rwl = new ReentrantReadWriteLock(); | |
20 | < | |
20 | > | |
21 | public RWCollection(Collection<E> c) { | |
22 | if (c == null) | |
23 | throw new NullPointerException(); | |
24 | this.c = c; | |
25 | } | |
26 | ||
27 | < | public RWCollection() { |
28 | < | this(new ArrayList<E>()); |
27 | > | public RWCollection() { |
28 | > | this(new ArrayList<E>()); |
29 | } | |
30 | ||
31 | public final int size() { |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |