MCPcopy Index your code
hub / github.com/antlr/codebuff / SynchronizedMultimap

Class SynchronizedMultimap

output/java_guava/1.4.17/Synchronized.java:524–705  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

522 }
523
524 private static class SynchronizedMultimap<K, V> extends SynchronizedObject
525 implements Multimap<K, V> {
526 transient Set<K> keySet;
527
528 transient Collection<V> valuesCollection;
529
530 transient Collection<Map.Entry<K, V>> entries;
531
532 transient Map<K, Collection<V>> asMap;
533
534 transient Multiset<K> keys;
535
536 @SuppressWarnings("unchecked")
537 @Override
538 Multimap<K, V> delegate() {
539 return (Multimap<K, V>) super.delegate();
540 }
541
542 SynchronizedMultimap(Multimap<K, V> delegate, @Nullable Object mutex) {
543 super(delegate, mutex);
544 }
545
546 @Override
547 public int size() {
548 synchronized (mutex) {
549 return delegate().size();
550 }
551 }
552
553 @Override
554 public boolean isEmpty() {
555 synchronized (mutex) {
556 return delegate().isEmpty();
557 }
558 }
559
560 @Override
561 public boolean containsKey(Object key) {
562 synchronized (mutex) {
563 return delegate().containsKey(key);
564 }
565 }
566
567 @Override
568 public boolean containsValue(Object value) {
569 synchronized (mutex) {
570 return delegate().containsValue(value);
571 }
572 }
573
574 @Override
575 public boolean containsEntry(Object key, Object value) {
576 synchronized (mutex) {
577 return delegate().containsEntry(key, value);
578 }
579 }
580
581 @Override

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected