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 |
4 |
< |
* http://creativecommons.org/licenses/publicdomain |
4 |
> |
* http://creativecommons.org/publicdomain/zero/1.0/ |
5 |
|
*/ |
6 |
|
import java.util.*; |
7 |
|
import java.util.concurrent.*; |
22 |
|
this.m = m; |
23 |
|
} |
24 |
|
|
25 |
< |
public SMap() { |
25 |
> |
public SMap() { |
26 |
|
this(new TreeMap()); // use TreeMap by default |
27 |
|
} |
28 |
|
|
29 |
|
public synchronized int size() { |
30 |
|
return m.size(); |
31 |
|
} |
32 |
< |
public synchronized boolean isEmpty(){ |
32 |
> |
public synchronized boolean isEmpty() { |
33 |
|
return m.isEmpty(); |
34 |
|
} |
35 |
|
|
40 |
|
public synchronized boolean containsKey(Object key) { |
41 |
|
return m.containsKey(key); |
42 |
|
} |
43 |
< |
public synchronized boolean containsValue(Object value){ |
43 |
> |
public synchronized boolean containsValue(Object value) { |
44 |
|
return m.containsValue(value); |
45 |
|
} |
46 |
|
|
48 |
|
public synchronized Set keySet() { // Not implemented |
49 |
|
return m.keySet(); |
50 |
|
} |
51 |
< |
|
51 |
> |
|
52 |
|
public synchronized Set entrySet() { // Not implemented |
53 |
|
return m.entrySet(); |
54 |
|
} |
55 |
< |
|
55 |
> |
|
56 |
|
public synchronized Collection values() { // Not implemented |
57 |
|
return m.values(); |
58 |
|
} |
59 |
< |
|
59 |
> |
|
60 |
|
public synchronized boolean equals(Object o) { |
61 |
|
return m.equals(o); |
62 |
|
} |
81 |
|
public synchronized void clear() { |
82 |
|
m.clear(); |
83 |
|
} |
84 |
< |
|
84 |
> |
|
85 |
|
} |