2381 lines
84 KiB
Java
2381 lines
84 KiB
Java
|
package com.google.common.collect;
|
||
|
|
||
|
import com.google.common.base.Function;
|
||
|
import com.google.common.base.Preconditions;
|
||
|
import com.google.common.collect.Multiset;
|
||
|
import com.google.common.collect.Table;
|
||
|
import java.io.IOException;
|
||
|
import java.io.ObjectOutputStream;
|
||
|
import java.io.Serializable;
|
||
|
import java.util.Collection;
|
||
|
import java.util.Comparator;
|
||
|
import java.util.Deque;
|
||
|
import java.util.Iterator;
|
||
|
import java.util.List;
|
||
|
import java.util.ListIterator;
|
||
|
import java.util.Map;
|
||
|
import java.util.NavigableMap;
|
||
|
import java.util.NavigableSet;
|
||
|
import java.util.Queue;
|
||
|
import java.util.RandomAccess;
|
||
|
import java.util.Set;
|
||
|
import java.util.SortedMap;
|
||
|
import java.util.SortedSet;
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* loaded from: classes2.dex */
|
||
|
public final class Synchronized {
|
||
|
private Synchronized() {
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* loaded from: classes2.dex */
|
||
|
public static class SynchronizedObject implements Serializable {
|
||
|
private static final long serialVersionUID = 0;
|
||
|
final Object delegate;
|
||
|
final Object mutex;
|
||
|
|
||
|
SynchronizedObject(Object obj, Object obj2) {
|
||
|
this.delegate = Preconditions.checkNotNull(obj);
|
||
|
this.mutex = obj2 == null ? this : obj2;
|
||
|
}
|
||
|
|
||
|
public String toString() {
|
||
|
String obj;
|
||
|
synchronized (this.mutex) {
|
||
|
obj = this.delegate.toString();
|
||
|
}
|
||
|
return obj;
|
||
|
}
|
||
|
|
||
|
private void writeObject(ObjectOutputStream objectOutputStream) throws IOException {
|
||
|
synchronized (this.mutex) {
|
||
|
objectOutputStream.defaultWriteObject();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
Object delegate() {
|
||
|
return this.delegate;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: private */
|
||
|
public static <E> Collection<E> collection(Collection<E> collection, Object obj) {
|
||
|
return new SynchronizedCollection(collection, obj);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* loaded from: classes2.dex */
|
||
|
public static class SynchronizedCollection<E> extends SynchronizedObject implements Collection<E> {
|
||
|
private static final long serialVersionUID = 0;
|
||
|
|
||
|
private SynchronizedCollection(Collection<E> collection, Object obj) {
|
||
|
super(collection, obj);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedObject
|
||
|
public Collection<E> delegate() {
|
||
|
return (Collection) super.delegate();
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Collection
|
||
|
public boolean add(E e) {
|
||
|
boolean add;
|
||
|
synchronized (this.mutex) {
|
||
|
add = delegate().add(e);
|
||
|
}
|
||
|
return add;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Collection
|
||
|
public boolean addAll(Collection<? extends E> collection) {
|
||
|
boolean addAll;
|
||
|
synchronized (this.mutex) {
|
||
|
addAll = delegate().addAll(collection);
|
||
|
}
|
||
|
return addAll;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Collection
|
||
|
public void clear() {
|
||
|
synchronized (this.mutex) {
|
||
|
delegate().clear();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public boolean contains(Object obj) {
|
||
|
boolean contains;
|
||
|
synchronized (this.mutex) {
|
||
|
contains = delegate().contains(obj);
|
||
|
}
|
||
|
return contains;
|
||
|
}
|
||
|
|
||
|
public boolean containsAll(Collection<?> collection) {
|
||
|
boolean containsAll;
|
||
|
synchronized (this.mutex) {
|
||
|
containsAll = delegate().containsAll(collection);
|
||
|
}
|
||
|
return containsAll;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Collection
|
||
|
public boolean isEmpty() {
|
||
|
boolean isEmpty;
|
||
|
synchronized (this.mutex) {
|
||
|
isEmpty = delegate().isEmpty();
|
||
|
}
|
||
|
return isEmpty;
|
||
|
}
|
||
|
|
||
|
public Iterator<E> iterator() {
|
||
|
return delegate().iterator();
|
||
|
}
|
||
|
|
||
|
public boolean remove(Object obj) {
|
||
|
boolean remove;
|
||
|
synchronized (this.mutex) {
|
||
|
remove = delegate().remove(obj);
|
||
|
}
|
||
|
return remove;
|
||
|
}
|
||
|
|
||
|
public boolean removeAll(Collection<?> collection) {
|
||
|
boolean removeAll;
|
||
|
synchronized (this.mutex) {
|
||
|
removeAll = delegate().removeAll(collection);
|
||
|
}
|
||
|
return removeAll;
|
||
|
}
|
||
|
|
||
|
public boolean retainAll(Collection<?> collection) {
|
||
|
boolean retainAll;
|
||
|
synchronized (this.mutex) {
|
||
|
retainAll = delegate().retainAll(collection);
|
||
|
}
|
||
|
return retainAll;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Collection
|
||
|
public int size() {
|
||
|
int size;
|
||
|
synchronized (this.mutex) {
|
||
|
size = delegate().size();
|
||
|
}
|
||
|
return size;
|
||
|
}
|
||
|
|
||
|
public Object[] toArray() {
|
||
|
Object[] array;
|
||
|
synchronized (this.mutex) {
|
||
|
array = delegate().toArray();
|
||
|
}
|
||
|
return array;
|
||
|
}
|
||
|
|
||
|
public <T> T[] toArray(T[] tArr) {
|
||
|
T[] tArr2;
|
||
|
synchronized (this.mutex) {
|
||
|
tArr2 = (T[]) delegate().toArray(tArr);
|
||
|
}
|
||
|
return tArr2;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
static <E> Set<E> set(Set<E> set, Object obj) {
|
||
|
return new SynchronizedSet(set, obj);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* loaded from: classes2.dex */
|
||
|
public static class SynchronizedSet<E> extends SynchronizedCollection<E> implements Set<E> {
|
||
|
private static final long serialVersionUID = 0;
|
||
|
|
||
|
SynchronizedSet(Set<E> set, Object obj) {
|
||
|
super(set, obj);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedCollection, com.google.common.collect.Synchronized.SynchronizedObject
|
||
|
public Set<E> delegate() {
|
||
|
return (Set) super.delegate();
|
||
|
}
|
||
|
|
||
|
public boolean equals(Object obj) {
|
||
|
boolean equals;
|
||
|
if (obj == this) {
|
||
|
return true;
|
||
|
}
|
||
|
synchronized (this.mutex) {
|
||
|
equals = delegate().equals(obj);
|
||
|
}
|
||
|
return equals;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Collection, java.util.Set
|
||
|
public int hashCode() {
|
||
|
int hashCode;
|
||
|
synchronized (this.mutex) {
|
||
|
hashCode = delegate().hashCode();
|
||
|
}
|
||
|
return hashCode;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: private */
|
||
|
public static <E> SortedSet<E> sortedSet(SortedSet<E> sortedSet, Object obj) {
|
||
|
return new SynchronizedSortedSet(sortedSet, obj);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* loaded from: classes2.dex */
|
||
|
public static class SynchronizedSortedSet<E> extends SynchronizedSet<E> implements SortedSet<E> {
|
||
|
private static final long serialVersionUID = 0;
|
||
|
|
||
|
SynchronizedSortedSet(SortedSet<E> sortedSet, Object obj) {
|
||
|
super(sortedSet, obj);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedSet, com.google.common.collect.Synchronized.SynchronizedCollection, com.google.common.collect.Synchronized.SynchronizedObject
|
||
|
public SortedSet<E> delegate() {
|
||
|
return (SortedSet) super.delegate();
|
||
|
}
|
||
|
|
||
|
@Override // java.util.SortedSet
|
||
|
public Comparator<? super E> comparator() {
|
||
|
Comparator<? super E> comparator;
|
||
|
synchronized (this.mutex) {
|
||
|
comparator = delegate().comparator();
|
||
|
}
|
||
|
return comparator;
|
||
|
}
|
||
|
|
||
|
public SortedSet<E> subSet(E e, E e2) {
|
||
|
SortedSet<E> sortedSet;
|
||
|
synchronized (this.mutex) {
|
||
|
sortedSet = Synchronized.sortedSet(delegate().subSet(e, e2), this.mutex);
|
||
|
}
|
||
|
return sortedSet;
|
||
|
}
|
||
|
|
||
|
public SortedSet<E> headSet(E e) {
|
||
|
SortedSet<E> sortedSet;
|
||
|
synchronized (this.mutex) {
|
||
|
sortedSet = Synchronized.sortedSet(delegate().headSet(e), this.mutex);
|
||
|
}
|
||
|
return sortedSet;
|
||
|
}
|
||
|
|
||
|
public SortedSet<E> tailSet(E e) {
|
||
|
SortedSet<E> sortedSet;
|
||
|
synchronized (this.mutex) {
|
||
|
sortedSet = Synchronized.sortedSet(delegate().tailSet(e), this.mutex);
|
||
|
}
|
||
|
return sortedSet;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.SortedSet
|
||
|
public E first() {
|
||
|
E first;
|
||
|
synchronized (this.mutex) {
|
||
|
first = delegate().first();
|
||
|
}
|
||
|
return first;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.SortedSet
|
||
|
public E last() {
|
||
|
E last;
|
||
|
synchronized (this.mutex) {
|
||
|
last = delegate().last();
|
||
|
}
|
||
|
return last;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: private */
|
||
|
public static <E> List<E> list(List<E> list, Object obj) {
|
||
|
if (list instanceof RandomAccess) {
|
||
|
return new SynchronizedRandomAccessList(list, obj);
|
||
|
}
|
||
|
return new SynchronizedList(list, obj);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* loaded from: classes2.dex */
|
||
|
public static class SynchronizedList<E> extends SynchronizedCollection<E> implements List<E> {
|
||
|
private static final long serialVersionUID = 0;
|
||
|
|
||
|
SynchronizedList(List<E> list, Object obj) {
|
||
|
super(list, obj);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedCollection, com.google.common.collect.Synchronized.SynchronizedObject
|
||
|
public List<E> delegate() {
|
||
|
return (List) super.delegate();
|
||
|
}
|
||
|
|
||
|
@Override // java.util.List
|
||
|
public void add(int i, E e) {
|
||
|
synchronized (this.mutex) {
|
||
|
delegate().add(i, e);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // java.util.List
|
||
|
public boolean addAll(int i, Collection<? extends E> collection) {
|
||
|
boolean addAll;
|
||
|
synchronized (this.mutex) {
|
||
|
addAll = delegate().addAll(i, collection);
|
||
|
}
|
||
|
return addAll;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.List
|
||
|
public E get(int i) {
|
||
|
E e;
|
||
|
synchronized (this.mutex) {
|
||
|
e = delegate().get(i);
|
||
|
}
|
||
|
return e;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.List
|
||
|
public int indexOf(Object obj) {
|
||
|
int indexOf;
|
||
|
synchronized (this.mutex) {
|
||
|
indexOf = delegate().indexOf(obj);
|
||
|
}
|
||
|
return indexOf;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.List
|
||
|
public int lastIndexOf(Object obj) {
|
||
|
int lastIndexOf;
|
||
|
synchronized (this.mutex) {
|
||
|
lastIndexOf = delegate().lastIndexOf(obj);
|
||
|
}
|
||
|
return lastIndexOf;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.List
|
||
|
public ListIterator<E> listIterator() {
|
||
|
return delegate().listIterator();
|
||
|
}
|
||
|
|
||
|
@Override // java.util.List
|
||
|
public ListIterator<E> listIterator(int i) {
|
||
|
return delegate().listIterator(i);
|
||
|
}
|
||
|
|
||
|
@Override // java.util.List
|
||
|
public E remove(int i) {
|
||
|
E remove;
|
||
|
synchronized (this.mutex) {
|
||
|
remove = delegate().remove(i);
|
||
|
}
|
||
|
return remove;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.List
|
||
|
public E set(int i, E e) {
|
||
|
E e2;
|
||
|
synchronized (this.mutex) {
|
||
|
e2 = delegate().set(i, e);
|
||
|
}
|
||
|
return e2;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.List
|
||
|
public List<E> subList(int i, int i2) {
|
||
|
List<E> list;
|
||
|
synchronized (this.mutex) {
|
||
|
list = Synchronized.list(delegate().subList(i, i2), this.mutex);
|
||
|
}
|
||
|
return list;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Collection, java.util.List
|
||
|
public boolean equals(Object obj) {
|
||
|
boolean equals;
|
||
|
if (obj == this) {
|
||
|
return true;
|
||
|
}
|
||
|
synchronized (this.mutex) {
|
||
|
equals = delegate().equals(obj);
|
||
|
}
|
||
|
return equals;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Collection, java.util.List
|
||
|
public int hashCode() {
|
||
|
int hashCode;
|
||
|
synchronized (this.mutex) {
|
||
|
hashCode = delegate().hashCode();
|
||
|
}
|
||
|
return hashCode;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* loaded from: classes2.dex */
|
||
|
public static class SynchronizedRandomAccessList<E> extends SynchronizedList<E> implements RandomAccess {
|
||
|
private static final long serialVersionUID = 0;
|
||
|
|
||
|
SynchronizedRandomAccessList(List<E> list, Object obj) {
|
||
|
super(list, obj);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
static <E> Multiset<E> multiset(Multiset<E> multiset, Object obj) {
|
||
|
return ((multiset instanceof SynchronizedMultiset) || (multiset instanceof ImmutableMultiset)) ? multiset : new SynchronizedMultiset(multiset, obj);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* loaded from: classes2.dex */
|
||
|
public static class SynchronizedMultiset<E> extends SynchronizedCollection<E> implements Multiset<E> {
|
||
|
private static final long serialVersionUID = 0;
|
||
|
transient Set<E> elementSet;
|
||
|
transient Set<Multiset.Entry<E>> entrySet;
|
||
|
|
||
|
SynchronizedMultiset(Multiset<E> multiset, Object obj) {
|
||
|
super(multiset, obj);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedCollection, com.google.common.collect.Synchronized.SynchronizedObject
|
||
|
public Multiset<E> delegate() {
|
||
|
return (Multiset) super.delegate();
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Multiset
|
||
|
public int count(Object obj) {
|
||
|
int count;
|
||
|
synchronized (this.mutex) {
|
||
|
count = delegate().count(obj);
|
||
|
}
|
||
|
return count;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Multiset
|
||
|
public int add(E e, int i) {
|
||
|
int add;
|
||
|
synchronized (this.mutex) {
|
||
|
add = delegate().add(e, i);
|
||
|
}
|
||
|
return add;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Multiset
|
||
|
public int remove(Object obj, int i) {
|
||
|
int remove;
|
||
|
synchronized (this.mutex) {
|
||
|
remove = delegate().remove(obj, i);
|
||
|
}
|
||
|
return remove;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Multiset
|
||
|
public int setCount(E e, int i) {
|
||
|
int count;
|
||
|
synchronized (this.mutex) {
|
||
|
count = delegate().setCount(e, i);
|
||
|
}
|
||
|
return count;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Multiset
|
||
|
public boolean setCount(E e, int i, int i2) {
|
||
|
boolean count;
|
||
|
synchronized (this.mutex) {
|
||
|
count = delegate().setCount(e, i, i2);
|
||
|
}
|
||
|
return count;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Multiset
|
||
|
public Set<E> elementSet() {
|
||
|
Set<E> set;
|
||
|
synchronized (this.mutex) {
|
||
|
if (this.elementSet == null) {
|
||
|
this.elementSet = Synchronized.typePreservingSet(delegate().elementSet(), this.mutex);
|
||
|
}
|
||
|
set = this.elementSet;
|
||
|
}
|
||
|
return set;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Multiset
|
||
|
public Set<Multiset.Entry<E>> entrySet() {
|
||
|
Set<Multiset.Entry<E>> set;
|
||
|
synchronized (this.mutex) {
|
||
|
if (this.entrySet == null) {
|
||
|
this.entrySet = Synchronized.typePreservingSet(delegate().entrySet(), this.mutex);
|
||
|
}
|
||
|
set = this.entrySet;
|
||
|
}
|
||
|
return set;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Collection, com.google.common.collect.Multiset
|
||
|
public boolean equals(Object obj) {
|
||
|
boolean equals;
|
||
|
if (obj == this) {
|
||
|
return true;
|
||
|
}
|
||
|
synchronized (this.mutex) {
|
||
|
equals = delegate().equals(obj);
|
||
|
}
|
||
|
return equals;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Collection, com.google.common.collect.Multiset
|
||
|
public int hashCode() {
|
||
|
int hashCode;
|
||
|
synchronized (this.mutex) {
|
||
|
hashCode = delegate().hashCode();
|
||
|
}
|
||
|
return hashCode;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public static <K, V> Multimap<K, V> multimap(Multimap<K, V> multimap, Object obj) {
|
||
|
return ((multimap instanceof SynchronizedMultimap) || (multimap instanceof BaseImmutableMultimap)) ? multimap : new SynchronizedMultimap(multimap, obj);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* loaded from: classes2.dex */
|
||
|
public static class SynchronizedMultimap<K, V> extends SynchronizedObject implements Multimap<K, V> {
|
||
|
private static final long serialVersionUID = 0;
|
||
|
transient Map<K, Collection<V>> asMap;
|
||
|
transient Collection<Map.Entry<K, V>> entries;
|
||
|
transient Set<K> keySet;
|
||
|
transient Multiset<K> keys;
|
||
|
transient Collection<V> valuesCollection;
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedObject
|
||
|
public Multimap<K, V> delegate() {
|
||
|
return (Multimap) super.delegate();
|
||
|
}
|
||
|
|
||
|
SynchronizedMultimap(Multimap<K, V> multimap, Object obj) {
|
||
|
super(multimap, obj);
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Multimap
|
||
|
public int size() {
|
||
|
int size;
|
||
|
synchronized (this.mutex) {
|
||
|
size = delegate().size();
|
||
|
}
|
||
|
return size;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Multimap
|
||
|
public boolean isEmpty() {
|
||
|
boolean isEmpty;
|
||
|
synchronized (this.mutex) {
|
||
|
isEmpty = delegate().isEmpty();
|
||
|
}
|
||
|
return isEmpty;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Multimap
|
||
|
public boolean containsKey(Object obj) {
|
||
|
boolean containsKey;
|
||
|
synchronized (this.mutex) {
|
||
|
containsKey = delegate().containsKey(obj);
|
||
|
}
|
||
|
return containsKey;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Multimap
|
||
|
public boolean containsValue(Object obj) {
|
||
|
boolean containsValue;
|
||
|
synchronized (this.mutex) {
|
||
|
containsValue = delegate().containsValue(obj);
|
||
|
}
|
||
|
return containsValue;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Multimap
|
||
|
public boolean containsEntry(Object obj, Object obj2) {
|
||
|
boolean containsEntry;
|
||
|
synchronized (this.mutex) {
|
||
|
containsEntry = delegate().containsEntry(obj, obj2);
|
||
|
}
|
||
|
return containsEntry;
|
||
|
}
|
||
|
|
||
|
public Collection<V> get(K k) {
|
||
|
Collection<V> typePreservingCollection;
|
||
|
synchronized (this.mutex) {
|
||
|
typePreservingCollection = Synchronized.typePreservingCollection(delegate().get(k), this.mutex);
|
||
|
}
|
||
|
return typePreservingCollection;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Multimap
|
||
|
public boolean put(K k, V v) {
|
||
|
boolean put;
|
||
|
synchronized (this.mutex) {
|
||
|
put = delegate().put(k, v);
|
||
|
}
|
||
|
return put;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Multimap
|
||
|
public boolean putAll(K k, Iterable<? extends V> iterable) {
|
||
|
boolean putAll;
|
||
|
synchronized (this.mutex) {
|
||
|
putAll = delegate().putAll(k, iterable);
|
||
|
}
|
||
|
return putAll;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Multimap
|
||
|
public boolean putAll(Multimap<? extends K, ? extends V> multimap) {
|
||
|
boolean putAll;
|
||
|
synchronized (this.mutex) {
|
||
|
putAll = delegate().putAll(multimap);
|
||
|
}
|
||
|
return putAll;
|
||
|
}
|
||
|
|
||
|
public Collection<V> replaceValues(K k, Iterable<? extends V> iterable) {
|
||
|
Collection<V> replaceValues;
|
||
|
synchronized (this.mutex) {
|
||
|
replaceValues = delegate().replaceValues(k, iterable);
|
||
|
}
|
||
|
return replaceValues;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Multimap
|
||
|
public boolean remove(Object obj, Object obj2) {
|
||
|
boolean remove;
|
||
|
synchronized (this.mutex) {
|
||
|
remove = delegate().remove(obj, obj2);
|
||
|
}
|
||
|
return remove;
|
||
|
}
|
||
|
|
||
|
public Collection<V> removeAll(Object obj) {
|
||
|
Collection<V> removeAll;
|
||
|
synchronized (this.mutex) {
|
||
|
removeAll = delegate().removeAll(obj);
|
||
|
}
|
||
|
return removeAll;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Multimap
|
||
|
public void clear() {
|
||
|
synchronized (this.mutex) {
|
||
|
delegate().clear();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Multimap
|
||
|
public Set<K> keySet() {
|
||
|
Set<K> set;
|
||
|
synchronized (this.mutex) {
|
||
|
if (this.keySet == null) {
|
||
|
this.keySet = Synchronized.typePreservingSet(delegate().keySet(), this.mutex);
|
||
|
}
|
||
|
set = this.keySet;
|
||
|
}
|
||
|
return set;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Multimap
|
||
|
public Collection<V> values() {
|
||
|
Collection<V> collection;
|
||
|
synchronized (this.mutex) {
|
||
|
if (this.valuesCollection == null) {
|
||
|
this.valuesCollection = Synchronized.collection(delegate().values(), this.mutex);
|
||
|
}
|
||
|
collection = this.valuesCollection;
|
||
|
}
|
||
|
return collection;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Multimap
|
||
|
public Collection<Map.Entry<K, V>> entries() {
|
||
|
Collection<Map.Entry<K, V>> collection;
|
||
|
synchronized (this.mutex) {
|
||
|
if (this.entries == null) {
|
||
|
this.entries = Synchronized.typePreservingCollection(delegate().entries(), this.mutex);
|
||
|
}
|
||
|
collection = this.entries;
|
||
|
}
|
||
|
return collection;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Multimap, com.google.common.collect.ListMultimap
|
||
|
public Map<K, Collection<V>> asMap() {
|
||
|
Map<K, Collection<V>> map;
|
||
|
synchronized (this.mutex) {
|
||
|
if (this.asMap == null) {
|
||
|
this.asMap = new SynchronizedAsMap(delegate().asMap(), this.mutex);
|
||
|
}
|
||
|
map = this.asMap;
|
||
|
}
|
||
|
return map;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Multimap
|
||
|
public Multiset<K> keys() {
|
||
|
Multiset<K> multiset;
|
||
|
synchronized (this.mutex) {
|
||
|
if (this.keys == null) {
|
||
|
this.keys = Synchronized.multiset(delegate().keys(), this.mutex);
|
||
|
}
|
||
|
multiset = this.keys;
|
||
|
}
|
||
|
return multiset;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Multimap, com.google.common.collect.ListMultimap
|
||
|
public boolean equals(Object obj) {
|
||
|
boolean equals;
|
||
|
if (obj == this) {
|
||
|
return true;
|
||
|
}
|
||
|
synchronized (this.mutex) {
|
||
|
equals = delegate().equals(obj);
|
||
|
}
|
||
|
return equals;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Multimap
|
||
|
public int hashCode() {
|
||
|
int hashCode;
|
||
|
synchronized (this.mutex) {
|
||
|
hashCode = delegate().hashCode();
|
||
|
}
|
||
|
return hashCode;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public static <K, V> ListMultimap<K, V> listMultimap(ListMultimap<K, V> listMultimap, Object obj) {
|
||
|
return ((listMultimap instanceof SynchronizedListMultimap) || (listMultimap instanceof BaseImmutableMultimap)) ? listMultimap : new SynchronizedListMultimap(listMultimap, obj);
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes2.dex */
|
||
|
static class SynchronizedListMultimap<K, V> extends SynchronizedMultimap<K, V> implements ListMultimap<K, V> {
|
||
|
private static final long serialVersionUID = 0;
|
||
|
|
||
|
/* JADX WARN: Multi-variable type inference failed */
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedMultimap, com.google.common.collect.Multimap
|
||
|
public /* bridge */ /* synthetic */ Collection get(Object obj) {
|
||
|
return get((SynchronizedListMultimap<K, V>) obj);
|
||
|
}
|
||
|
|
||
|
/* JADX WARN: Multi-variable type inference failed */
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedMultimap, com.google.common.collect.Multimap
|
||
|
public /* bridge */ /* synthetic */ Collection replaceValues(Object obj, Iterable iterable) {
|
||
|
return replaceValues((SynchronizedListMultimap<K, V>) obj, iterable);
|
||
|
}
|
||
|
|
||
|
SynchronizedListMultimap(ListMultimap<K, V> listMultimap, Object obj) {
|
||
|
super(listMultimap, obj);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedMultimap, com.google.common.collect.Synchronized.SynchronizedObject
|
||
|
public ListMultimap<K, V> delegate() {
|
||
|
return (ListMultimap) super.delegate();
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedMultimap, com.google.common.collect.Multimap
|
||
|
public List<V> get(K k) {
|
||
|
List<V> list;
|
||
|
synchronized (this.mutex) {
|
||
|
list = Synchronized.list(delegate().get((ListMultimap<K, V>) k), this.mutex);
|
||
|
}
|
||
|
return list;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedMultimap, com.google.common.collect.Multimap
|
||
|
public List<V> removeAll(Object obj) {
|
||
|
List<V> removeAll;
|
||
|
synchronized (this.mutex) {
|
||
|
removeAll = delegate().removeAll(obj);
|
||
|
}
|
||
|
return removeAll;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedMultimap, com.google.common.collect.Multimap
|
||
|
public List<V> replaceValues(K k, Iterable<? extends V> iterable) {
|
||
|
List<V> replaceValues;
|
||
|
synchronized (this.mutex) {
|
||
|
replaceValues = delegate().replaceValues((ListMultimap<K, V>) k, (Iterable) iterable);
|
||
|
}
|
||
|
return replaceValues;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public static <K, V> SetMultimap<K, V> setMultimap(SetMultimap<K, V> setMultimap, Object obj) {
|
||
|
return ((setMultimap instanceof SynchronizedSetMultimap) || (setMultimap instanceof BaseImmutableMultimap)) ? setMultimap : new SynchronizedSetMultimap(setMultimap, obj);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* loaded from: classes2.dex */
|
||
|
public static class SynchronizedSetMultimap<K, V> extends SynchronizedMultimap<K, V> implements SetMultimap<K, V> {
|
||
|
private static final long serialVersionUID = 0;
|
||
|
transient Set<Map.Entry<K, V>> entrySet;
|
||
|
|
||
|
/* JADX WARN: Multi-variable type inference failed */
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedMultimap, com.google.common.collect.Multimap
|
||
|
public /* bridge */ /* synthetic */ Collection get(Object obj) {
|
||
|
return get((SynchronizedSetMultimap<K, V>) obj);
|
||
|
}
|
||
|
|
||
|
/* JADX WARN: Multi-variable type inference failed */
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedMultimap, com.google.common.collect.Multimap
|
||
|
public /* bridge */ /* synthetic */ Collection replaceValues(Object obj, Iterable iterable) {
|
||
|
return replaceValues((SynchronizedSetMultimap<K, V>) obj, iterable);
|
||
|
}
|
||
|
|
||
|
SynchronizedSetMultimap(SetMultimap<K, V> setMultimap, Object obj) {
|
||
|
super(setMultimap, obj);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedMultimap, com.google.common.collect.Synchronized.SynchronizedObject
|
||
|
public SetMultimap<K, V> delegate() {
|
||
|
return (SetMultimap) super.delegate();
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedMultimap, com.google.common.collect.Multimap
|
||
|
public Set<V> get(K k) {
|
||
|
Set<V> set;
|
||
|
synchronized (this.mutex) {
|
||
|
set = Synchronized.set(delegate().get((SetMultimap<K, V>) k), this.mutex);
|
||
|
}
|
||
|
return set;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedMultimap, com.google.common.collect.Multimap
|
||
|
public Set<V> removeAll(Object obj) {
|
||
|
Set<V> removeAll;
|
||
|
synchronized (this.mutex) {
|
||
|
removeAll = delegate().removeAll(obj);
|
||
|
}
|
||
|
return removeAll;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedMultimap, com.google.common.collect.Multimap
|
||
|
public Set<V> replaceValues(K k, Iterable<? extends V> iterable) {
|
||
|
Set<V> replaceValues;
|
||
|
synchronized (this.mutex) {
|
||
|
replaceValues = delegate().replaceValues((SetMultimap<K, V>) k, (Iterable) iterable);
|
||
|
}
|
||
|
return replaceValues;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedMultimap, com.google.common.collect.Multimap
|
||
|
public Set<Map.Entry<K, V>> entries() {
|
||
|
Set<Map.Entry<K, V>> set;
|
||
|
synchronized (this.mutex) {
|
||
|
if (this.entrySet == null) {
|
||
|
this.entrySet = Synchronized.set(delegate().entries(), this.mutex);
|
||
|
}
|
||
|
set = this.entrySet;
|
||
|
}
|
||
|
return set;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public static <K, V> SortedSetMultimap<K, V> sortedSetMultimap(SortedSetMultimap<K, V> sortedSetMultimap, Object obj) {
|
||
|
return sortedSetMultimap instanceof SynchronizedSortedSetMultimap ? sortedSetMultimap : new SynchronizedSortedSetMultimap(sortedSetMultimap, obj);
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes2.dex */
|
||
|
static class SynchronizedSortedSetMultimap<K, V> extends SynchronizedSetMultimap<K, V> implements SortedSetMultimap<K, V> {
|
||
|
private static final long serialVersionUID = 0;
|
||
|
|
||
|
/* JADX WARN: Multi-variable type inference failed */
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedSetMultimap, com.google.common.collect.Synchronized.SynchronizedMultimap, com.google.common.collect.Multimap
|
||
|
public /* bridge */ /* synthetic */ Collection get(Object obj) {
|
||
|
return get((SynchronizedSortedSetMultimap<K, V>) obj);
|
||
|
}
|
||
|
|
||
|
/* JADX WARN: Multi-variable type inference failed */
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedSetMultimap, com.google.common.collect.Synchronized.SynchronizedMultimap, com.google.common.collect.Multimap
|
||
|
public /* bridge */ /* synthetic */ Set get(Object obj) {
|
||
|
return get((SynchronizedSortedSetMultimap<K, V>) obj);
|
||
|
}
|
||
|
|
||
|
/* JADX WARN: Multi-variable type inference failed */
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedSetMultimap, com.google.common.collect.Synchronized.SynchronizedMultimap, com.google.common.collect.Multimap
|
||
|
public /* bridge */ /* synthetic */ Collection replaceValues(Object obj, Iterable iterable) {
|
||
|
return replaceValues((SynchronizedSortedSetMultimap<K, V>) obj, iterable);
|
||
|
}
|
||
|
|
||
|
/* JADX WARN: Multi-variable type inference failed */
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedSetMultimap, com.google.common.collect.Synchronized.SynchronizedMultimap, com.google.common.collect.Multimap
|
||
|
public /* bridge */ /* synthetic */ Set replaceValues(Object obj, Iterable iterable) {
|
||
|
return replaceValues((SynchronizedSortedSetMultimap<K, V>) obj, iterable);
|
||
|
}
|
||
|
|
||
|
SynchronizedSortedSetMultimap(SortedSetMultimap<K, V> sortedSetMultimap, Object obj) {
|
||
|
super(sortedSetMultimap, obj);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedSetMultimap, com.google.common.collect.Synchronized.SynchronizedMultimap, com.google.common.collect.Synchronized.SynchronizedObject
|
||
|
public SortedSetMultimap<K, V> delegate() {
|
||
|
return (SortedSetMultimap) super.delegate();
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedSetMultimap, com.google.common.collect.Synchronized.SynchronizedMultimap, com.google.common.collect.Multimap
|
||
|
public SortedSet<V> get(K k) {
|
||
|
SortedSet<V> sortedSet;
|
||
|
synchronized (this.mutex) {
|
||
|
sortedSet = Synchronized.sortedSet(delegate().get((SortedSetMultimap<K, V>) k), this.mutex);
|
||
|
}
|
||
|
return sortedSet;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedSetMultimap, com.google.common.collect.Synchronized.SynchronizedMultimap, com.google.common.collect.Multimap
|
||
|
public SortedSet<V> removeAll(Object obj) {
|
||
|
SortedSet<V> removeAll;
|
||
|
synchronized (this.mutex) {
|
||
|
removeAll = delegate().removeAll(obj);
|
||
|
}
|
||
|
return removeAll;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedSetMultimap, com.google.common.collect.Synchronized.SynchronizedMultimap, com.google.common.collect.Multimap
|
||
|
public SortedSet<V> replaceValues(K k, Iterable<? extends V> iterable) {
|
||
|
SortedSet<V> replaceValues;
|
||
|
synchronized (this.mutex) {
|
||
|
replaceValues = delegate().replaceValues((SortedSetMultimap<K, V>) k, (Iterable) iterable);
|
||
|
}
|
||
|
return replaceValues;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.SortedSetMultimap
|
||
|
public Comparator<? super V> valueComparator() {
|
||
|
Comparator<? super V> valueComparator;
|
||
|
synchronized (this.mutex) {
|
||
|
valueComparator = delegate().valueComparator();
|
||
|
}
|
||
|
return valueComparator;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: private */
|
||
|
public static <E> Collection<E> typePreservingCollection(Collection<E> collection, Object obj) {
|
||
|
if (collection instanceof SortedSet) {
|
||
|
return sortedSet((SortedSet) collection, obj);
|
||
|
}
|
||
|
if (collection instanceof Set) {
|
||
|
return set((Set) collection, obj);
|
||
|
}
|
||
|
if (collection instanceof List) {
|
||
|
return list((List) collection, obj);
|
||
|
}
|
||
|
return collection(collection, obj);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: private */
|
||
|
public static <E> Set<E> typePreservingSet(Set<E> set, Object obj) {
|
||
|
if (set instanceof SortedSet) {
|
||
|
return sortedSet((SortedSet) set, obj);
|
||
|
}
|
||
|
return set(set, obj);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* loaded from: classes2.dex */
|
||
|
public static class SynchronizedAsMapEntries<K, V> extends SynchronizedSet<Map.Entry<K, Collection<V>>> {
|
||
|
private static final long serialVersionUID = 0;
|
||
|
|
||
|
SynchronizedAsMapEntries(Set<Map.Entry<K, Collection<V>>> set, Object obj) {
|
||
|
super(set, obj);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* renamed from: com.google.common.collect.Synchronized$SynchronizedAsMapEntries$1, reason: invalid class name */
|
||
|
/* loaded from: classes2.dex */
|
||
|
public class AnonymousClass1 extends TransformedIterator<Map.Entry<K, Collection<V>>, Map.Entry<K, Collection<V>>> {
|
||
|
final SynchronizedAsMapEntries this$0;
|
||
|
|
||
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||
|
AnonymousClass1(SynchronizedAsMapEntries synchronizedAsMapEntries, Iterator it) {
|
||
|
super(it);
|
||
|
this.this$0 = synchronizedAsMapEntries;
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
@Override // com.google.common.collect.TransformedIterator
|
||
|
public Map.Entry<K, Collection<V>> transform(Map.Entry<K, Collection<V>> entry) {
|
||
|
return new ForwardingMapEntry<K, Collection<V>>(this, entry) { // from class: com.google.common.collect.Synchronized.SynchronizedAsMapEntries.1.1
|
||
|
final AnonymousClass1 this$1;
|
||
|
final Map.Entry val$entry;
|
||
|
|
||
|
{
|
||
|
this.this$1 = this;
|
||
|
this.val$entry = entry;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.ForwardingMapEntry, java.util.Map.Entry
|
||
|
public Collection<V> getValue() {
|
||
|
return Synchronized.typePreservingCollection((Collection) this.val$entry.getValue(), this.this$1.this$0.mutex);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
@Override // com.google.common.collect.ForwardingMapEntry, com.google.common.collect.ForwardingObject
|
||
|
public Map.Entry<K, Collection<V>> delegate() {
|
||
|
return this.val$entry;
|
||
|
}
|
||
|
};
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedCollection, java.util.Collection, java.lang.Iterable, java.util.Set
|
||
|
public Iterator<Map.Entry<K, Collection<V>>> iterator() {
|
||
|
return new AnonymousClass1(this, super.iterator());
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedCollection, java.util.Collection, java.util.Set
|
||
|
public Object[] toArray() {
|
||
|
Object[] arrayImpl;
|
||
|
synchronized (this.mutex) {
|
||
|
arrayImpl = ObjectArrays.toArrayImpl(delegate());
|
||
|
}
|
||
|
return arrayImpl;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedCollection, java.util.Collection, java.util.Set
|
||
|
public <T> T[] toArray(T[] tArr) {
|
||
|
T[] tArr2;
|
||
|
synchronized (this.mutex) {
|
||
|
tArr2 = (T[]) ObjectArrays.toArrayImpl(delegate(), tArr);
|
||
|
}
|
||
|
return tArr2;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedCollection, java.util.Collection, java.util.Set
|
||
|
public boolean contains(Object obj) {
|
||
|
boolean containsEntryImpl;
|
||
|
synchronized (this.mutex) {
|
||
|
containsEntryImpl = Maps.containsEntryImpl(delegate(), obj);
|
||
|
}
|
||
|
return containsEntryImpl;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedCollection, java.util.Collection, java.util.Set
|
||
|
public boolean containsAll(Collection<?> collection) {
|
||
|
boolean containsAllImpl;
|
||
|
synchronized (this.mutex) {
|
||
|
containsAllImpl = Collections2.containsAllImpl(delegate(), collection);
|
||
|
}
|
||
|
return containsAllImpl;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedSet, java.util.Collection, java.util.Set
|
||
|
public boolean equals(Object obj) {
|
||
|
boolean equalsImpl;
|
||
|
if (obj == this) {
|
||
|
return true;
|
||
|
}
|
||
|
synchronized (this.mutex) {
|
||
|
equalsImpl = Sets.equalsImpl(delegate(), obj);
|
||
|
}
|
||
|
return equalsImpl;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedCollection, java.util.Collection, java.util.Set
|
||
|
public boolean remove(Object obj) {
|
||
|
boolean removeEntryImpl;
|
||
|
synchronized (this.mutex) {
|
||
|
removeEntryImpl = Maps.removeEntryImpl(delegate(), obj);
|
||
|
}
|
||
|
return removeEntryImpl;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedCollection, java.util.Collection, java.util.Set
|
||
|
public boolean removeAll(Collection<?> collection) {
|
||
|
boolean removeAll;
|
||
|
synchronized (this.mutex) {
|
||
|
removeAll = Iterators.removeAll(delegate().iterator(), collection);
|
||
|
}
|
||
|
return removeAll;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedCollection, java.util.Collection, java.util.Set
|
||
|
public boolean retainAll(Collection<?> collection) {
|
||
|
boolean retainAll;
|
||
|
synchronized (this.mutex) {
|
||
|
retainAll = Iterators.retainAll(delegate().iterator(), collection);
|
||
|
}
|
||
|
return retainAll;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
static <K, V> Map<K, V> map(Map<K, V> map, Object obj) {
|
||
|
return new SynchronizedMap(map, obj);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* loaded from: classes2.dex */
|
||
|
public static class SynchronizedMap<K, V> extends SynchronizedObject implements Map<K, V> {
|
||
|
private static final long serialVersionUID = 0;
|
||
|
transient Set<Map.Entry<K, V>> entrySet;
|
||
|
transient Set<K> keySet;
|
||
|
transient Collection<V> values;
|
||
|
|
||
|
SynchronizedMap(Map<K, V> map, Object obj) {
|
||
|
super(map, obj);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedObject
|
||
|
public Map<K, V> delegate() {
|
||
|
return (Map) super.delegate();
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Map
|
||
|
public void clear() {
|
||
|
synchronized (this.mutex) {
|
||
|
delegate().clear();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Map
|
||
|
public boolean containsKey(Object obj) {
|
||
|
boolean containsKey;
|
||
|
synchronized (this.mutex) {
|
||
|
containsKey = delegate().containsKey(obj);
|
||
|
}
|
||
|
return containsKey;
|
||
|
}
|
||
|
|
||
|
public boolean containsValue(Object obj) {
|
||
|
boolean containsValue;
|
||
|
synchronized (this.mutex) {
|
||
|
containsValue = delegate().containsValue(obj);
|
||
|
}
|
||
|
return containsValue;
|
||
|
}
|
||
|
|
||
|
public Set<Map.Entry<K, V>> entrySet() {
|
||
|
Set<Map.Entry<K, V>> set;
|
||
|
synchronized (this.mutex) {
|
||
|
if (this.entrySet == null) {
|
||
|
this.entrySet = Synchronized.set(delegate().entrySet(), this.mutex);
|
||
|
}
|
||
|
set = this.entrySet;
|
||
|
}
|
||
|
return set;
|
||
|
}
|
||
|
|
||
|
public V get(Object obj) {
|
||
|
V v;
|
||
|
synchronized (this.mutex) {
|
||
|
v = delegate().get(obj);
|
||
|
}
|
||
|
return v;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Map
|
||
|
public boolean isEmpty() {
|
||
|
boolean isEmpty;
|
||
|
synchronized (this.mutex) {
|
||
|
isEmpty = delegate().isEmpty();
|
||
|
}
|
||
|
return isEmpty;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Map
|
||
|
public Set<K> keySet() {
|
||
|
Set<K> set;
|
||
|
synchronized (this.mutex) {
|
||
|
if (this.keySet == null) {
|
||
|
this.keySet = Synchronized.set(delegate().keySet(), this.mutex);
|
||
|
}
|
||
|
set = this.keySet;
|
||
|
}
|
||
|
return set;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Map
|
||
|
public V put(K k, V v) {
|
||
|
V put;
|
||
|
synchronized (this.mutex) {
|
||
|
put = delegate().put(k, v);
|
||
|
}
|
||
|
return put;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Map
|
||
|
public void putAll(Map<? extends K, ? extends V> map) {
|
||
|
synchronized (this.mutex) {
|
||
|
delegate().putAll(map);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Map
|
||
|
public V remove(Object obj) {
|
||
|
V remove;
|
||
|
synchronized (this.mutex) {
|
||
|
remove = delegate().remove(obj);
|
||
|
}
|
||
|
return remove;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Map
|
||
|
public int size() {
|
||
|
int size;
|
||
|
synchronized (this.mutex) {
|
||
|
size = delegate().size();
|
||
|
}
|
||
|
return size;
|
||
|
}
|
||
|
|
||
|
public Collection<V> values() {
|
||
|
Collection<V> collection;
|
||
|
synchronized (this.mutex) {
|
||
|
if (this.values == null) {
|
||
|
this.values = Synchronized.collection(delegate().values(), this.mutex);
|
||
|
}
|
||
|
collection = this.values;
|
||
|
}
|
||
|
return collection;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Map
|
||
|
public boolean equals(Object obj) {
|
||
|
boolean equals;
|
||
|
if (obj == this) {
|
||
|
return true;
|
||
|
}
|
||
|
synchronized (this.mutex) {
|
||
|
equals = delegate().equals(obj);
|
||
|
}
|
||
|
return equals;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Map
|
||
|
public int hashCode() {
|
||
|
int hashCode;
|
||
|
synchronized (this.mutex) {
|
||
|
hashCode = delegate().hashCode();
|
||
|
}
|
||
|
return hashCode;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
static <K, V> SortedMap<K, V> sortedMap(SortedMap<K, V> sortedMap, Object obj) {
|
||
|
return new SynchronizedSortedMap(sortedMap, obj);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* loaded from: classes2.dex */
|
||
|
public static class SynchronizedSortedMap<K, V> extends SynchronizedMap<K, V> implements SortedMap<K, V> {
|
||
|
private static final long serialVersionUID = 0;
|
||
|
|
||
|
SynchronizedSortedMap(SortedMap<K, V> sortedMap, Object obj) {
|
||
|
super(sortedMap, obj);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedMap, com.google.common.collect.Synchronized.SynchronizedObject
|
||
|
public SortedMap<K, V> delegate() {
|
||
|
return (SortedMap) super.delegate();
|
||
|
}
|
||
|
|
||
|
@Override // java.util.SortedMap
|
||
|
public Comparator<? super K> comparator() {
|
||
|
Comparator<? super K> comparator;
|
||
|
synchronized (this.mutex) {
|
||
|
comparator = delegate().comparator();
|
||
|
}
|
||
|
return comparator;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.SortedMap
|
||
|
public K firstKey() {
|
||
|
K firstKey;
|
||
|
synchronized (this.mutex) {
|
||
|
firstKey = delegate().firstKey();
|
||
|
}
|
||
|
return firstKey;
|
||
|
}
|
||
|
|
||
|
public SortedMap<K, V> headMap(K k) {
|
||
|
SortedMap<K, V> sortedMap;
|
||
|
synchronized (this.mutex) {
|
||
|
sortedMap = Synchronized.sortedMap(delegate().headMap(k), this.mutex);
|
||
|
}
|
||
|
return sortedMap;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.SortedMap
|
||
|
public K lastKey() {
|
||
|
K lastKey;
|
||
|
synchronized (this.mutex) {
|
||
|
lastKey = delegate().lastKey();
|
||
|
}
|
||
|
return lastKey;
|
||
|
}
|
||
|
|
||
|
public SortedMap<K, V> subMap(K k, K k2) {
|
||
|
SortedMap<K, V> sortedMap;
|
||
|
synchronized (this.mutex) {
|
||
|
sortedMap = Synchronized.sortedMap(delegate().subMap(k, k2), this.mutex);
|
||
|
}
|
||
|
return sortedMap;
|
||
|
}
|
||
|
|
||
|
public SortedMap<K, V> tailMap(K k) {
|
||
|
SortedMap<K, V> sortedMap;
|
||
|
synchronized (this.mutex) {
|
||
|
sortedMap = Synchronized.sortedMap(delegate().tailMap(k), this.mutex);
|
||
|
}
|
||
|
return sortedMap;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* JADX WARN: Multi-variable type inference failed */
|
||
|
public static <K, V> BiMap<K, V> biMap(BiMap<K, V> biMap, Object obj) {
|
||
|
if ((biMap instanceof SynchronizedBiMap) || (biMap instanceof ImmutableBiMap)) {
|
||
|
return biMap;
|
||
|
}
|
||
|
return new SynchronizedBiMap(biMap, obj, null);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* loaded from: classes2.dex */
|
||
|
public static class SynchronizedBiMap<K, V> extends SynchronizedMap<K, V> implements BiMap<K, V>, Serializable {
|
||
|
private static final long serialVersionUID = 0;
|
||
|
private transient BiMap<V, K> inverse;
|
||
|
private transient Set<V> valueSet;
|
||
|
|
||
|
private SynchronizedBiMap(BiMap<K, V> biMap, Object obj, BiMap<V, K> biMap2) {
|
||
|
super(biMap, obj);
|
||
|
this.inverse = biMap2;
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedMap, com.google.common.collect.Synchronized.SynchronizedObject
|
||
|
public BiMap<K, V> delegate() {
|
||
|
return (BiMap) super.delegate();
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedMap, java.util.Map
|
||
|
public Set<V> values() {
|
||
|
Set<V> set;
|
||
|
synchronized (this.mutex) {
|
||
|
if (this.valueSet == null) {
|
||
|
this.valueSet = Synchronized.set(delegate().values(), this.mutex);
|
||
|
}
|
||
|
set = this.valueSet;
|
||
|
}
|
||
|
return set;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.BiMap
|
||
|
public V forcePut(K k, V v) {
|
||
|
V forcePut;
|
||
|
synchronized (this.mutex) {
|
||
|
forcePut = delegate().forcePut(k, v);
|
||
|
}
|
||
|
return forcePut;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.BiMap
|
||
|
public BiMap<V, K> inverse() {
|
||
|
BiMap<V, K> biMap;
|
||
|
synchronized (this.mutex) {
|
||
|
if (this.inverse == null) {
|
||
|
this.inverse = new SynchronizedBiMap(delegate().inverse(), this.mutex, this);
|
||
|
}
|
||
|
biMap = this.inverse;
|
||
|
}
|
||
|
return biMap;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes2.dex */
|
||
|
static class SynchronizedAsMap<K, V> extends SynchronizedMap<K, Collection<V>> {
|
||
|
private static final long serialVersionUID = 0;
|
||
|
transient Set<Map.Entry<K, Collection<V>>> asMapEntrySet;
|
||
|
transient Collection<Collection<V>> asMapValues;
|
||
|
|
||
|
SynchronizedAsMap(Map<K, Collection<V>> map, Object obj) {
|
||
|
super(map, obj);
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedMap, java.util.Map
|
||
|
public Collection<V> get(Object obj) {
|
||
|
Collection<V> typePreservingCollection;
|
||
|
synchronized (this.mutex) {
|
||
|
Collection collection = (Collection) super.get(obj);
|
||
|
typePreservingCollection = collection == null ? null : Synchronized.typePreservingCollection(collection, this.mutex);
|
||
|
}
|
||
|
return typePreservingCollection;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedMap, java.util.Map
|
||
|
public Set<Map.Entry<K, Collection<V>>> entrySet() {
|
||
|
Set<Map.Entry<K, Collection<V>>> set;
|
||
|
synchronized (this.mutex) {
|
||
|
if (this.asMapEntrySet == null) {
|
||
|
this.asMapEntrySet = new SynchronizedAsMapEntries(delegate().entrySet(), this.mutex);
|
||
|
}
|
||
|
set = this.asMapEntrySet;
|
||
|
}
|
||
|
return set;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedMap, java.util.Map
|
||
|
public Collection<Collection<V>> values() {
|
||
|
Collection<Collection<V>> collection;
|
||
|
synchronized (this.mutex) {
|
||
|
if (this.asMapValues == null) {
|
||
|
this.asMapValues = new SynchronizedAsMapValues(delegate().values(), this.mutex);
|
||
|
}
|
||
|
collection = this.asMapValues;
|
||
|
}
|
||
|
return collection;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedMap, java.util.Map
|
||
|
public boolean containsValue(Object obj) {
|
||
|
return values().contains(obj);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* loaded from: classes2.dex */
|
||
|
public static class SynchronizedAsMapValues<V> extends SynchronizedCollection<Collection<V>> {
|
||
|
private static final long serialVersionUID = 0;
|
||
|
|
||
|
SynchronizedAsMapValues(Collection<Collection<V>> collection, Object obj) {
|
||
|
super(collection, obj);
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedCollection, java.util.Collection, java.lang.Iterable, java.util.Set
|
||
|
public Iterator<Collection<V>> iterator() {
|
||
|
return new TransformedIterator<Collection<V>, Collection<V>>(this, super.iterator()) { // from class: com.google.common.collect.Synchronized.SynchronizedAsMapValues.1
|
||
|
final SynchronizedAsMapValues this$0;
|
||
|
|
||
|
{
|
||
|
this.this$0 = this;
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
@Override // com.google.common.collect.TransformedIterator
|
||
|
public Collection<V> transform(Collection<V> collection) {
|
||
|
return Synchronized.typePreservingCollection(collection, this.this$0.mutex);
|
||
|
}
|
||
|
};
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* loaded from: classes2.dex */
|
||
|
public static class SynchronizedNavigableSet<E> extends SynchronizedSortedSet<E> implements NavigableSet<E> {
|
||
|
private static final long serialVersionUID = 0;
|
||
|
transient NavigableSet<E> descendingSet;
|
||
|
|
||
|
SynchronizedNavigableSet(NavigableSet<E> navigableSet, Object obj) {
|
||
|
super(navigableSet, obj);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedSortedSet, com.google.common.collect.Synchronized.SynchronizedSet, com.google.common.collect.Synchronized.SynchronizedCollection, com.google.common.collect.Synchronized.SynchronizedObject
|
||
|
public NavigableSet<E> delegate() {
|
||
|
return (NavigableSet) super.delegate();
|
||
|
}
|
||
|
|
||
|
@Override // java.util.NavigableSet
|
||
|
public E ceiling(E e) {
|
||
|
E ceiling;
|
||
|
synchronized (this.mutex) {
|
||
|
ceiling = delegate().ceiling(e);
|
||
|
}
|
||
|
return ceiling;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.NavigableSet
|
||
|
public Iterator<E> descendingIterator() {
|
||
|
return delegate().descendingIterator();
|
||
|
}
|
||
|
|
||
|
@Override // java.util.NavigableSet
|
||
|
public NavigableSet<E> descendingSet() {
|
||
|
synchronized (this.mutex) {
|
||
|
NavigableSet<E> navigableSet = this.descendingSet;
|
||
|
if (navigableSet != null) {
|
||
|
return navigableSet;
|
||
|
}
|
||
|
NavigableSet<E> navigableSet2 = Synchronized.navigableSet(delegate().descendingSet(), this.mutex);
|
||
|
this.descendingSet = navigableSet2;
|
||
|
return navigableSet2;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // java.util.NavigableSet
|
||
|
public E floor(E e) {
|
||
|
E floor;
|
||
|
synchronized (this.mutex) {
|
||
|
floor = delegate().floor(e);
|
||
|
}
|
||
|
return floor;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.NavigableSet
|
||
|
public NavigableSet<E> headSet(E e, boolean z) {
|
||
|
NavigableSet<E> navigableSet;
|
||
|
synchronized (this.mutex) {
|
||
|
navigableSet = Synchronized.navigableSet(delegate().headSet(e, z), this.mutex);
|
||
|
}
|
||
|
return navigableSet;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedSortedSet, java.util.SortedSet, java.util.NavigableSet
|
||
|
public SortedSet<E> headSet(E e) {
|
||
|
return headSet(e, false);
|
||
|
}
|
||
|
|
||
|
@Override // java.util.NavigableSet
|
||
|
public E higher(E e) {
|
||
|
E higher;
|
||
|
synchronized (this.mutex) {
|
||
|
higher = delegate().higher(e);
|
||
|
}
|
||
|
return higher;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.NavigableSet
|
||
|
public E lower(E e) {
|
||
|
E lower;
|
||
|
synchronized (this.mutex) {
|
||
|
lower = delegate().lower(e);
|
||
|
}
|
||
|
return lower;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.NavigableSet
|
||
|
public E pollFirst() {
|
||
|
E pollFirst;
|
||
|
synchronized (this.mutex) {
|
||
|
pollFirst = delegate().pollFirst();
|
||
|
}
|
||
|
return pollFirst;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.NavigableSet
|
||
|
public E pollLast() {
|
||
|
E pollLast;
|
||
|
synchronized (this.mutex) {
|
||
|
pollLast = delegate().pollLast();
|
||
|
}
|
||
|
return pollLast;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.NavigableSet
|
||
|
public NavigableSet<E> subSet(E e, boolean z, E e2, boolean z2) {
|
||
|
NavigableSet<E> navigableSet;
|
||
|
synchronized (this.mutex) {
|
||
|
navigableSet = Synchronized.navigableSet(delegate().subSet(e, z, e2, z2), this.mutex);
|
||
|
}
|
||
|
return navigableSet;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedSortedSet, java.util.SortedSet, java.util.NavigableSet
|
||
|
public SortedSet<E> subSet(E e, E e2) {
|
||
|
return subSet(e, true, e2, false);
|
||
|
}
|
||
|
|
||
|
@Override // java.util.NavigableSet
|
||
|
public NavigableSet<E> tailSet(E e, boolean z) {
|
||
|
NavigableSet<E> navigableSet;
|
||
|
synchronized (this.mutex) {
|
||
|
navigableSet = Synchronized.navigableSet(delegate().tailSet(e, z), this.mutex);
|
||
|
}
|
||
|
return navigableSet;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedSortedSet, java.util.SortedSet, java.util.NavigableSet
|
||
|
public SortedSet<E> tailSet(E e) {
|
||
|
return tailSet(e, true);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
static <E> NavigableSet<E> navigableSet(NavigableSet<E> navigableSet, Object obj) {
|
||
|
return new SynchronizedNavigableSet(navigableSet, obj);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public static <E> NavigableSet<E> navigableSet(NavigableSet<E> navigableSet) {
|
||
|
return navigableSet(navigableSet, null);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public static <K, V> NavigableMap<K, V> navigableMap(NavigableMap<K, V> navigableMap) {
|
||
|
return navigableMap(navigableMap, null);
|
||
|
}
|
||
|
|
||
|
static <K, V> NavigableMap<K, V> navigableMap(NavigableMap<K, V> navigableMap, Object obj) {
|
||
|
return new SynchronizedNavigableMap(navigableMap, obj);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* loaded from: classes2.dex */
|
||
|
public static class SynchronizedNavigableMap<K, V> extends SynchronizedSortedMap<K, V> implements NavigableMap<K, V> {
|
||
|
private static final long serialVersionUID = 0;
|
||
|
transient NavigableSet<K> descendingKeySet;
|
||
|
transient NavigableMap<K, V> descendingMap;
|
||
|
transient NavigableSet<K> navigableKeySet;
|
||
|
|
||
|
SynchronizedNavigableMap(NavigableMap<K, V> navigableMap, Object obj) {
|
||
|
super(navigableMap, obj);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedSortedMap, com.google.common.collect.Synchronized.SynchronizedMap, com.google.common.collect.Synchronized.SynchronizedObject
|
||
|
public NavigableMap<K, V> delegate() {
|
||
|
return (NavigableMap) super.delegate();
|
||
|
}
|
||
|
|
||
|
@Override // java.util.NavigableMap
|
||
|
public Map.Entry<K, V> ceilingEntry(K k) {
|
||
|
Map.Entry<K, V> nullableSynchronizedEntry;
|
||
|
synchronized (this.mutex) {
|
||
|
nullableSynchronizedEntry = Synchronized.nullableSynchronizedEntry(delegate().ceilingEntry(k), this.mutex);
|
||
|
}
|
||
|
return nullableSynchronizedEntry;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.NavigableMap
|
||
|
public K ceilingKey(K k) {
|
||
|
K ceilingKey;
|
||
|
synchronized (this.mutex) {
|
||
|
ceilingKey = delegate().ceilingKey(k);
|
||
|
}
|
||
|
return ceilingKey;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.NavigableMap
|
||
|
public NavigableSet<K> descendingKeySet() {
|
||
|
synchronized (this.mutex) {
|
||
|
NavigableSet<K> navigableSet = this.descendingKeySet;
|
||
|
if (navigableSet != null) {
|
||
|
return navigableSet;
|
||
|
}
|
||
|
NavigableSet<K> navigableSet2 = Synchronized.navigableSet(delegate().descendingKeySet(), this.mutex);
|
||
|
this.descendingKeySet = navigableSet2;
|
||
|
return navigableSet2;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // java.util.NavigableMap
|
||
|
public NavigableMap<K, V> descendingMap() {
|
||
|
synchronized (this.mutex) {
|
||
|
NavigableMap<K, V> navigableMap = this.descendingMap;
|
||
|
if (navigableMap != null) {
|
||
|
return navigableMap;
|
||
|
}
|
||
|
NavigableMap<K, V> navigableMap2 = Synchronized.navigableMap(delegate().descendingMap(), this.mutex);
|
||
|
this.descendingMap = navigableMap2;
|
||
|
return navigableMap2;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // java.util.NavigableMap
|
||
|
public Map.Entry<K, V> firstEntry() {
|
||
|
Map.Entry<K, V> nullableSynchronizedEntry;
|
||
|
synchronized (this.mutex) {
|
||
|
nullableSynchronizedEntry = Synchronized.nullableSynchronizedEntry(delegate().firstEntry(), this.mutex);
|
||
|
}
|
||
|
return nullableSynchronizedEntry;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.NavigableMap
|
||
|
public Map.Entry<K, V> floorEntry(K k) {
|
||
|
Map.Entry<K, V> nullableSynchronizedEntry;
|
||
|
synchronized (this.mutex) {
|
||
|
nullableSynchronizedEntry = Synchronized.nullableSynchronizedEntry(delegate().floorEntry(k), this.mutex);
|
||
|
}
|
||
|
return nullableSynchronizedEntry;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.NavigableMap
|
||
|
public K floorKey(K k) {
|
||
|
K floorKey;
|
||
|
synchronized (this.mutex) {
|
||
|
floorKey = delegate().floorKey(k);
|
||
|
}
|
||
|
return floorKey;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.NavigableMap
|
||
|
public NavigableMap<K, V> headMap(K k, boolean z) {
|
||
|
NavigableMap<K, V> navigableMap;
|
||
|
synchronized (this.mutex) {
|
||
|
navigableMap = Synchronized.navigableMap(delegate().headMap(k, z), this.mutex);
|
||
|
}
|
||
|
return navigableMap;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedSortedMap, java.util.SortedMap, java.util.NavigableMap
|
||
|
public SortedMap<K, V> headMap(K k) {
|
||
|
return headMap(k, false);
|
||
|
}
|
||
|
|
||
|
@Override // java.util.NavigableMap
|
||
|
public Map.Entry<K, V> higherEntry(K k) {
|
||
|
Map.Entry<K, V> nullableSynchronizedEntry;
|
||
|
synchronized (this.mutex) {
|
||
|
nullableSynchronizedEntry = Synchronized.nullableSynchronizedEntry(delegate().higherEntry(k), this.mutex);
|
||
|
}
|
||
|
return nullableSynchronizedEntry;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.NavigableMap
|
||
|
public K higherKey(K k) {
|
||
|
K higherKey;
|
||
|
synchronized (this.mutex) {
|
||
|
higherKey = delegate().higherKey(k);
|
||
|
}
|
||
|
return higherKey;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.NavigableMap
|
||
|
public Map.Entry<K, V> lastEntry() {
|
||
|
Map.Entry<K, V> nullableSynchronizedEntry;
|
||
|
synchronized (this.mutex) {
|
||
|
nullableSynchronizedEntry = Synchronized.nullableSynchronizedEntry(delegate().lastEntry(), this.mutex);
|
||
|
}
|
||
|
return nullableSynchronizedEntry;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.NavigableMap
|
||
|
public Map.Entry<K, V> lowerEntry(K k) {
|
||
|
Map.Entry<K, V> nullableSynchronizedEntry;
|
||
|
synchronized (this.mutex) {
|
||
|
nullableSynchronizedEntry = Synchronized.nullableSynchronizedEntry(delegate().lowerEntry(k), this.mutex);
|
||
|
}
|
||
|
return nullableSynchronizedEntry;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.NavigableMap
|
||
|
public K lowerKey(K k) {
|
||
|
K lowerKey;
|
||
|
synchronized (this.mutex) {
|
||
|
lowerKey = delegate().lowerKey(k);
|
||
|
}
|
||
|
return lowerKey;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedMap, java.util.Map
|
||
|
public Set<K> keySet() {
|
||
|
return navigableKeySet();
|
||
|
}
|
||
|
|
||
|
@Override // java.util.NavigableMap
|
||
|
public NavigableSet<K> navigableKeySet() {
|
||
|
synchronized (this.mutex) {
|
||
|
NavigableSet<K> navigableSet = this.navigableKeySet;
|
||
|
if (navigableSet != null) {
|
||
|
return navigableSet;
|
||
|
}
|
||
|
NavigableSet<K> navigableSet2 = Synchronized.navigableSet(delegate().navigableKeySet(), this.mutex);
|
||
|
this.navigableKeySet = navigableSet2;
|
||
|
return navigableSet2;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // java.util.NavigableMap
|
||
|
public Map.Entry<K, V> pollFirstEntry() {
|
||
|
Map.Entry<K, V> nullableSynchronizedEntry;
|
||
|
synchronized (this.mutex) {
|
||
|
nullableSynchronizedEntry = Synchronized.nullableSynchronizedEntry(delegate().pollFirstEntry(), this.mutex);
|
||
|
}
|
||
|
return nullableSynchronizedEntry;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.NavigableMap
|
||
|
public Map.Entry<K, V> pollLastEntry() {
|
||
|
Map.Entry<K, V> nullableSynchronizedEntry;
|
||
|
synchronized (this.mutex) {
|
||
|
nullableSynchronizedEntry = Synchronized.nullableSynchronizedEntry(delegate().pollLastEntry(), this.mutex);
|
||
|
}
|
||
|
return nullableSynchronizedEntry;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.NavigableMap
|
||
|
public NavigableMap<K, V> subMap(K k, boolean z, K k2, boolean z2) {
|
||
|
NavigableMap<K, V> navigableMap;
|
||
|
synchronized (this.mutex) {
|
||
|
navigableMap = Synchronized.navigableMap(delegate().subMap(k, z, k2, z2), this.mutex);
|
||
|
}
|
||
|
return navigableMap;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedSortedMap, java.util.SortedMap, java.util.NavigableMap
|
||
|
public SortedMap<K, V> subMap(K k, K k2) {
|
||
|
return subMap(k, true, k2, false);
|
||
|
}
|
||
|
|
||
|
@Override // java.util.NavigableMap
|
||
|
public NavigableMap<K, V> tailMap(K k, boolean z) {
|
||
|
NavigableMap<K, V> navigableMap;
|
||
|
synchronized (this.mutex) {
|
||
|
navigableMap = Synchronized.navigableMap(delegate().tailMap(k, z), this.mutex);
|
||
|
}
|
||
|
return navigableMap;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedSortedMap, java.util.SortedMap, java.util.NavigableMap
|
||
|
public SortedMap<K, V> tailMap(K k) {
|
||
|
return tailMap(k, true);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: private */
|
||
|
public static <K, V> Map.Entry<K, V> nullableSynchronizedEntry(Map.Entry<K, V> entry, Object obj) {
|
||
|
if (entry == null) {
|
||
|
return null;
|
||
|
}
|
||
|
return new SynchronizedEntry(entry, obj);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* loaded from: classes2.dex */
|
||
|
public static class SynchronizedEntry<K, V> extends SynchronizedObject implements Map.Entry<K, V> {
|
||
|
private static final long serialVersionUID = 0;
|
||
|
|
||
|
SynchronizedEntry(Map.Entry<K, V> entry, Object obj) {
|
||
|
super(entry, obj);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedObject
|
||
|
public Map.Entry<K, V> delegate() {
|
||
|
return (Map.Entry) super.delegate();
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Map.Entry
|
||
|
public boolean equals(Object obj) {
|
||
|
boolean equals;
|
||
|
synchronized (this.mutex) {
|
||
|
equals = delegate().equals(obj);
|
||
|
}
|
||
|
return equals;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Map.Entry
|
||
|
public int hashCode() {
|
||
|
int hashCode;
|
||
|
synchronized (this.mutex) {
|
||
|
hashCode = delegate().hashCode();
|
||
|
}
|
||
|
return hashCode;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Map.Entry
|
||
|
public K getKey() {
|
||
|
K key;
|
||
|
synchronized (this.mutex) {
|
||
|
key = delegate().getKey();
|
||
|
}
|
||
|
return key;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Map.Entry
|
||
|
public V getValue() {
|
||
|
V value;
|
||
|
synchronized (this.mutex) {
|
||
|
value = delegate().getValue();
|
||
|
}
|
||
|
return value;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Map.Entry
|
||
|
public V setValue(V v) {
|
||
|
V value;
|
||
|
synchronized (this.mutex) {
|
||
|
value = delegate().setValue(v);
|
||
|
}
|
||
|
return value;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public static <E> Queue<E> queue(Queue<E> queue, Object obj) {
|
||
|
return !(queue instanceof SynchronizedQueue) ? new SynchronizedQueue(queue, obj) : queue;
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* loaded from: classes2.dex */
|
||
|
public static class SynchronizedQueue<E> extends SynchronizedCollection<E> implements Queue<E> {
|
||
|
private static final long serialVersionUID = 0;
|
||
|
|
||
|
SynchronizedQueue(Queue<E> queue, Object obj) {
|
||
|
super(queue, obj);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedCollection, com.google.common.collect.Synchronized.SynchronizedObject
|
||
|
public Queue<E> delegate() {
|
||
|
return (Queue) super.delegate();
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Queue
|
||
|
public E element() {
|
||
|
E element;
|
||
|
synchronized (this.mutex) {
|
||
|
element = delegate().element();
|
||
|
}
|
||
|
return element;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Queue
|
||
|
public boolean offer(E e) {
|
||
|
boolean offer;
|
||
|
synchronized (this.mutex) {
|
||
|
offer = delegate().offer(e);
|
||
|
}
|
||
|
return offer;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Queue
|
||
|
public E peek() {
|
||
|
E peek;
|
||
|
synchronized (this.mutex) {
|
||
|
peek = delegate().peek();
|
||
|
}
|
||
|
return peek;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Queue
|
||
|
public E poll() {
|
||
|
E poll;
|
||
|
synchronized (this.mutex) {
|
||
|
poll = delegate().poll();
|
||
|
}
|
||
|
return poll;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Queue
|
||
|
public E remove() {
|
||
|
E remove;
|
||
|
synchronized (this.mutex) {
|
||
|
remove = delegate().remove();
|
||
|
}
|
||
|
return remove;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public static <E> Deque<E> deque(Deque<E> deque, Object obj) {
|
||
|
return new SynchronizedDeque(deque, obj);
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes2.dex */
|
||
|
static final class SynchronizedDeque<E> extends SynchronizedQueue<E> implements Deque<E> {
|
||
|
private static final long serialVersionUID = 0;
|
||
|
|
||
|
SynchronizedDeque(Deque<E> deque, Object obj) {
|
||
|
super(deque, obj);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedQueue, com.google.common.collect.Synchronized.SynchronizedCollection, com.google.common.collect.Synchronized.SynchronizedObject
|
||
|
public final Deque<E> delegate() {
|
||
|
return (Deque) super.delegate();
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Deque
|
||
|
public final void addFirst(E e) {
|
||
|
synchronized (this.mutex) {
|
||
|
delegate().addFirst(e);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Deque
|
||
|
public final void addLast(E e) {
|
||
|
synchronized (this.mutex) {
|
||
|
delegate().addLast(e);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Deque
|
||
|
public final boolean offerFirst(E e) {
|
||
|
boolean offerFirst;
|
||
|
synchronized (this.mutex) {
|
||
|
offerFirst = delegate().offerFirst(e);
|
||
|
}
|
||
|
return offerFirst;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Deque
|
||
|
public final boolean offerLast(E e) {
|
||
|
boolean offerLast;
|
||
|
synchronized (this.mutex) {
|
||
|
offerLast = delegate().offerLast(e);
|
||
|
}
|
||
|
return offerLast;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Deque
|
||
|
public final E removeFirst() {
|
||
|
E removeFirst;
|
||
|
synchronized (this.mutex) {
|
||
|
removeFirst = delegate().removeFirst();
|
||
|
}
|
||
|
return removeFirst;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Deque
|
||
|
public final E removeLast() {
|
||
|
E removeLast;
|
||
|
synchronized (this.mutex) {
|
||
|
removeLast = delegate().removeLast();
|
||
|
}
|
||
|
return removeLast;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Deque
|
||
|
public final E pollFirst() {
|
||
|
E pollFirst;
|
||
|
synchronized (this.mutex) {
|
||
|
pollFirst = delegate().pollFirst();
|
||
|
}
|
||
|
return pollFirst;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Deque
|
||
|
public final E pollLast() {
|
||
|
E pollLast;
|
||
|
synchronized (this.mutex) {
|
||
|
pollLast = delegate().pollLast();
|
||
|
}
|
||
|
return pollLast;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Deque
|
||
|
public final E getFirst() {
|
||
|
E first;
|
||
|
synchronized (this.mutex) {
|
||
|
first = delegate().getFirst();
|
||
|
}
|
||
|
return first;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Deque
|
||
|
public final E getLast() {
|
||
|
E last;
|
||
|
synchronized (this.mutex) {
|
||
|
last = delegate().getLast();
|
||
|
}
|
||
|
return last;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Deque
|
||
|
public final E peekFirst() {
|
||
|
E peekFirst;
|
||
|
synchronized (this.mutex) {
|
||
|
peekFirst = delegate().peekFirst();
|
||
|
}
|
||
|
return peekFirst;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Deque
|
||
|
public final E peekLast() {
|
||
|
E peekLast;
|
||
|
synchronized (this.mutex) {
|
||
|
peekLast = delegate().peekLast();
|
||
|
}
|
||
|
return peekLast;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Deque
|
||
|
public final boolean removeFirstOccurrence(Object obj) {
|
||
|
boolean removeFirstOccurrence;
|
||
|
synchronized (this.mutex) {
|
||
|
removeFirstOccurrence = delegate().removeFirstOccurrence(obj);
|
||
|
}
|
||
|
return removeFirstOccurrence;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Deque
|
||
|
public final boolean removeLastOccurrence(Object obj) {
|
||
|
boolean removeLastOccurrence;
|
||
|
synchronized (this.mutex) {
|
||
|
removeLastOccurrence = delegate().removeLastOccurrence(obj);
|
||
|
}
|
||
|
return removeLastOccurrence;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Deque
|
||
|
public final void push(E e) {
|
||
|
synchronized (this.mutex) {
|
||
|
delegate().push(e);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Deque
|
||
|
public final E pop() {
|
||
|
E pop;
|
||
|
synchronized (this.mutex) {
|
||
|
pop = delegate().pop();
|
||
|
}
|
||
|
return pop;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Deque
|
||
|
public final Iterator<E> descendingIterator() {
|
||
|
Iterator<E> descendingIterator;
|
||
|
synchronized (this.mutex) {
|
||
|
descendingIterator = delegate().descendingIterator();
|
||
|
}
|
||
|
return descendingIterator;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public static <R, C, V> Table<R, C, V> table(Table<R, C, V> table, Object obj) {
|
||
|
return new SynchronizedTable(table, obj);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* loaded from: classes2.dex */
|
||
|
public static final class SynchronizedTable<R, C, V> extends SynchronizedObject implements Table<R, C, V> {
|
||
|
SynchronizedTable(Table<R, C, V> table, Object obj) {
|
||
|
super(table, obj);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
@Override // com.google.common.collect.Synchronized.SynchronizedObject
|
||
|
public final Table<R, C, V> delegate() {
|
||
|
return (Table) super.delegate();
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Table
|
||
|
public final boolean contains(Object obj, Object obj2) {
|
||
|
boolean contains;
|
||
|
synchronized (this.mutex) {
|
||
|
contains = delegate().contains(obj, obj2);
|
||
|
}
|
||
|
return contains;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Table
|
||
|
public final boolean containsRow(Object obj) {
|
||
|
boolean containsRow;
|
||
|
synchronized (this.mutex) {
|
||
|
containsRow = delegate().containsRow(obj);
|
||
|
}
|
||
|
return containsRow;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Table
|
||
|
public final boolean containsColumn(Object obj) {
|
||
|
boolean containsColumn;
|
||
|
synchronized (this.mutex) {
|
||
|
containsColumn = delegate().containsColumn(obj);
|
||
|
}
|
||
|
return containsColumn;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Table
|
||
|
public final boolean containsValue(Object obj) {
|
||
|
boolean containsValue;
|
||
|
synchronized (this.mutex) {
|
||
|
containsValue = delegate().containsValue(obj);
|
||
|
}
|
||
|
return containsValue;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Table
|
||
|
public final V get(Object obj, Object obj2) {
|
||
|
V v;
|
||
|
synchronized (this.mutex) {
|
||
|
v = delegate().get(obj, obj2);
|
||
|
}
|
||
|
return v;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Table
|
||
|
public final boolean isEmpty() {
|
||
|
boolean isEmpty;
|
||
|
synchronized (this.mutex) {
|
||
|
isEmpty = delegate().isEmpty();
|
||
|
}
|
||
|
return isEmpty;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Table
|
||
|
public final int size() {
|
||
|
int size;
|
||
|
synchronized (this.mutex) {
|
||
|
size = delegate().size();
|
||
|
}
|
||
|
return size;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Table
|
||
|
public final void clear() {
|
||
|
synchronized (this.mutex) {
|
||
|
delegate().clear();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Table
|
||
|
public final V put(R r, C c, V v) {
|
||
|
V put;
|
||
|
synchronized (this.mutex) {
|
||
|
put = delegate().put(r, c, v);
|
||
|
}
|
||
|
return put;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Table
|
||
|
public final void putAll(Table<? extends R, ? extends C, ? extends V> table) {
|
||
|
synchronized (this.mutex) {
|
||
|
delegate().putAll(table);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Table
|
||
|
public final V remove(Object obj, Object obj2) {
|
||
|
V remove;
|
||
|
synchronized (this.mutex) {
|
||
|
remove = delegate().remove(obj, obj2);
|
||
|
}
|
||
|
return remove;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Table
|
||
|
public final Map<C, V> row(R r) {
|
||
|
Map<C, V> map;
|
||
|
synchronized (this.mutex) {
|
||
|
map = Synchronized.map(delegate().row(r), this.mutex);
|
||
|
}
|
||
|
return map;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Table
|
||
|
public final Map<R, V> column(C c) {
|
||
|
Map<R, V> map;
|
||
|
synchronized (this.mutex) {
|
||
|
map = Synchronized.map(delegate().column(c), this.mutex);
|
||
|
}
|
||
|
return map;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Table
|
||
|
public final Set<Table.Cell<R, C, V>> cellSet() {
|
||
|
Set<Table.Cell<R, C, V>> set;
|
||
|
synchronized (this.mutex) {
|
||
|
set = Synchronized.set(delegate().cellSet(), this.mutex);
|
||
|
}
|
||
|
return set;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Table
|
||
|
public final Set<R> rowKeySet() {
|
||
|
Set<R> set;
|
||
|
synchronized (this.mutex) {
|
||
|
set = Synchronized.set(delegate().rowKeySet(), this.mutex);
|
||
|
}
|
||
|
return set;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Table
|
||
|
public final Set<C> columnKeySet() {
|
||
|
Set<C> set;
|
||
|
synchronized (this.mutex) {
|
||
|
set = Synchronized.set(delegate().columnKeySet(), this.mutex);
|
||
|
}
|
||
|
return set;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Table
|
||
|
public final Collection<V> values() {
|
||
|
Collection<V> collection;
|
||
|
synchronized (this.mutex) {
|
||
|
collection = Synchronized.collection(delegate().values(), this.mutex);
|
||
|
}
|
||
|
return collection;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Table
|
||
|
public final Map<R, Map<C, V>> rowMap() {
|
||
|
Map<R, Map<C, V>> map;
|
||
|
synchronized (this.mutex) {
|
||
|
map = Synchronized.map(Maps.transformValues(delegate().rowMap(), new Function<Map<C, V>, Map<C, V>>(this) { // from class: com.google.common.collect.Synchronized.SynchronizedTable.1
|
||
|
final SynchronizedTable this$0;
|
||
|
|
||
|
{
|
||
|
this.this$0 = this;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.base.Function
|
||
|
public Map<C, V> apply(Map<C, V> map2) {
|
||
|
return Synchronized.map(map2, this.this$0.mutex);
|
||
|
}
|
||
|
}), this.mutex);
|
||
|
}
|
||
|
return map;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Table
|
||
|
public final Map<C, Map<R, V>> columnMap() {
|
||
|
Map<C, Map<R, V>> map;
|
||
|
synchronized (this.mutex) {
|
||
|
map = Synchronized.map(Maps.transformValues(delegate().columnMap(), new Function<Map<R, V>, Map<R, V>>(this) { // from class: com.google.common.collect.Synchronized.SynchronizedTable.2
|
||
|
final SynchronizedTable this$0;
|
||
|
|
||
|
{
|
||
|
this.this$0 = this;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.base.Function
|
||
|
public Map<R, V> apply(Map<R, V> map2) {
|
||
|
return Synchronized.map(map2, this.this$0.mutex);
|
||
|
}
|
||
|
}), this.mutex);
|
||
|
}
|
||
|
return map;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Table
|
||
|
public final int hashCode() {
|
||
|
int hashCode;
|
||
|
synchronized (this.mutex) {
|
||
|
hashCode = delegate().hashCode();
|
||
|
}
|
||
|
return hashCode;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.Table
|
||
|
public final boolean equals(Object obj) {
|
||
|
boolean equals;
|
||
|
if (this == obj) {
|
||
|
return true;
|
||
|
}
|
||
|
synchronized (this.mutex) {
|
||
|
equals = delegate().equals(obj);
|
||
|
}
|
||
|
return equals;
|
||
|
}
|
||
|
}
|
||
|
}
|