| 390 | } |
| 391 | |
| 392 | static class SyncSet implements Set |
| 393 | { |
| 394 | private Set base; |
| 395 | |
| 396 | SyncSet(Set base) |
| 397 | { |
| 398 | this.base = base; |
| 399 | } |
| 400 | |
| 401 | public int size() |
| 402 | { |
| 403 | synchronized (base) |
| 404 | { |
| 405 | return base.size(); |
| 406 | } |
| 407 | } |
| 408 | |
| 409 | public boolean isEmpty() |
| 410 | { |
| 411 | synchronized (base) |
| 412 | { |
| 413 | return base.isEmpty(); |
| 414 | } |
| 415 | } |
| 416 | |
| 417 | public boolean contains(Object o) |
| 418 | { |
| 419 | synchronized (base) |
| 420 | { |
| 421 | return base.contains(o); |
| 422 | } |
| 423 | } |
| 424 | |
| 425 | public Iterator iterator() |
| 426 | { |
| 427 | synchronized (base) |
| 428 | { |
| 429 | return new ArrayList(base).iterator(); |
| 430 | } |
| 431 | } |
| 432 | |
| 433 | public Object[] toArray() |
| 434 | { |
| 435 | synchronized (base) |
| 436 | { |
| 437 | return base.toArray(); |
| 438 | } |
| 439 | } |
| 440 | |
| 441 | public boolean add(Object o) |
| 442 | { |
| 443 | synchronized (base) |
| 444 | { |
| 445 | return base.add(o); |
| 446 | } |
| 447 | } |
| 448 | |
| 449 | public boolean remove(Object o) |
nothing calls this directly
no outgoing calls
no test coverage detected