2 |
|
/* |
3 |
|
* Written by Doug Lea with assistance from members of JCP JSR-166 |
4 |
|
* Expert Group and released to the public domain, as explained at |
5 |
< |
* http://creativecommons.org/licenses/publicdomain |
5 |
> |
* http://creativecommons.org/publicdomain/zero/1.0/ |
6 |
|
*/ |
7 |
|
|
8 |
|
// Stand-alone version of java.util.Collections.synchronizedCollection |
29 |
|
} |
30 |
|
|
31 |
|
public final int size() { |
32 |
< |
synchronized(mutex) {return c.size();} |
32 |
> |
synchronized (mutex) {return c.size();} |
33 |
|
} |
34 |
|
public final boolean isEmpty() { |
35 |
< |
synchronized(mutex) {return c.isEmpty();} |
35 |
> |
synchronized (mutex) {return c.isEmpty();} |
36 |
|
} |
37 |
|
public final boolean contains(Object o) { |
38 |
< |
synchronized(mutex) {return c.contains(o);} |
38 |
> |
synchronized (mutex) {return c.contains(o);} |
39 |
|
} |
40 |
|
public final Object[] toArray() { |
41 |
< |
synchronized(mutex) {return c.toArray();} |
41 |
> |
synchronized (mutex) {return c.toArray();} |
42 |
|
} |
43 |
|
public final <T> T[] toArray(T[] a) { |
44 |
< |
synchronized(mutex) {return c.toArray(a);} |
44 |
> |
synchronized (mutex) {return c.toArray(a);} |
45 |
|
} |
46 |
|
|
47 |
|
public final Iterator<E> iterator() { |
49 |
|
} |
50 |
|
|
51 |
|
public final boolean add(E e) { |
52 |
< |
synchronized(mutex) {return c.add(e);} |
52 |
> |
synchronized (mutex) {return c.add(e);} |
53 |
|
} |
54 |
|
public final boolean remove(Object o) { |
55 |
< |
synchronized(mutex) {return c.remove(o);} |
55 |
> |
synchronized (mutex) {return c.remove(o);} |
56 |
|
} |
57 |
|
|
58 |
|
public final boolean containsAll(Collection<?> coll) { |
59 |
< |
synchronized(mutex) {return c.containsAll(coll);} |
59 |
> |
synchronized (mutex) {return c.containsAll(coll);} |
60 |
|
} |
61 |
|
public final boolean addAll(Collection<? extends E> coll) { |
62 |
< |
synchronized(mutex) {return c.addAll(coll);} |
62 |
> |
synchronized (mutex) {return c.addAll(coll);} |
63 |
|
} |
64 |
|
public final boolean removeAll(Collection<?> coll) { |
65 |
< |
synchronized(mutex) {return c.removeAll(coll);} |
65 |
> |
synchronized (mutex) {return c.removeAll(coll);} |
66 |
|
} |
67 |
|
public final boolean retainAll(Collection<?> coll) { |
68 |
< |
synchronized(mutex) {return c.retainAll(coll);} |
68 |
> |
synchronized (mutex) {return c.retainAll(coll);} |
69 |
|
} |
70 |
|
public final void clear() { |
71 |
< |
synchronized(mutex) {c.clear();} |
71 |
> |
synchronized (mutex) {c.clear();} |
72 |
|
} |
73 |
|
public final String toString() { |
74 |
< |
synchronized(mutex) {return c.toString();} |
74 |
> |
synchronized (mutex) {return c.toString();} |
75 |
|
} |
76 |
|
private void writeObject(ObjectOutputStream s) throws IOException { |
77 |
< |
synchronized(mutex) {s.defaultWriteObject();} |
77 |
> |
synchronized (mutex) {s.defaultWriteObject();} |
78 |
|
} |
79 |
|
} |