package com.google.common.collect; import com.google.common.base.Function; import com.google.common.base.Preconditions; import com.google.common.base.Predicate; import com.google.common.base.Predicates; import com.google.common.base.Supplier; import com.google.common.collect.Maps; import com.google.common.collect.Sets; import com.google.common.collect.Table; import java.io.Serializable; import java.util.Collection; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.Map; import java.util.Set; /* JADX INFO: Access modifiers changed from: package-private */ /* loaded from: classes2.dex */ public class StandardTable extends AbstractTable implements Serializable { private static final long serialVersionUID = 0; @GwtTransient final Map> backingMap; private transient Set columnKeySet; private transient StandardTable.ColumnMap columnMap; @GwtTransient final Supplier> factory; private transient Map> rowMap; /* JADX INFO: Access modifiers changed from: package-private */ public StandardTable(Map> map, Supplier> supplier) { this.backingMap = map; this.factory = supplier; } @Override // com.google.common.collect.AbstractTable, com.google.common.collect.Table public boolean contains(Object obj, Object obj2) { return (obj == null || obj2 == null || !super.contains(obj, obj2)) ? false : true; } @Override // com.google.common.collect.AbstractTable, com.google.common.collect.Table public boolean containsColumn(Object obj) { if (obj == null) { return false; } Iterator> it = this.backingMap.values().iterator(); while (it.hasNext()) { if (Maps.safeContainsKey(it.next(), obj)) { return true; } } return false; } @Override // com.google.common.collect.AbstractTable, com.google.common.collect.Table public boolean containsRow(Object obj) { return obj != null && Maps.safeContainsKey(this.backingMap, obj); } @Override // com.google.common.collect.AbstractTable, com.google.common.collect.Table public boolean containsValue(Object obj) { return obj != null && super.containsValue(obj); } @Override // com.google.common.collect.AbstractTable, com.google.common.collect.Table public V get(Object obj, Object obj2) { if (obj == null || obj2 == null) { return null; } return (V) super.get(obj, obj2); } @Override // com.google.common.collect.AbstractTable, com.google.common.collect.Table public boolean isEmpty() { return this.backingMap.isEmpty(); } @Override // com.google.common.collect.Table public int size() { Iterator> it = this.backingMap.values().iterator(); int i = 0; while (it.hasNext()) { i += it.next().size(); } return i; } @Override // com.google.common.collect.AbstractTable, com.google.common.collect.Table public void clear() { this.backingMap.clear(); } private Map getOrCreate(R r) { Map map = this.backingMap.get(r); if (map != null) { return map; } Map map2 = this.factory.get(); this.backingMap.put(r, map2); return map2; } @Override // com.google.common.collect.AbstractTable, com.google.common.collect.Table public V put(R r, C c, V v) { Preconditions.checkNotNull(r); Preconditions.checkNotNull(c); Preconditions.checkNotNull(v); return getOrCreate(r).put(c, v); } @Override // com.google.common.collect.AbstractTable, com.google.common.collect.Table public V remove(Object obj, Object obj2) { Map map; if (obj == null || obj2 == null || (map = (Map) Maps.safeGet(this.backingMap, obj)) == null) { return null; } V v = (V) map.remove(obj2); if (map.isEmpty()) { this.backingMap.remove(obj); } return v; } /* JADX INFO: Access modifiers changed from: private */ public Map removeColumn(Object obj) { LinkedHashMap linkedHashMap = new LinkedHashMap(); Iterator>> it = this.backingMap.entrySet().iterator(); while (it.hasNext()) { Map.Entry> next = it.next(); V remove = next.getValue().remove(obj); if (remove != null) { linkedHashMap.put(next.getKey(), remove); if (next.getValue().isEmpty()) { it.remove(); } } } return linkedHashMap; } /* JADX INFO: Access modifiers changed from: private */ public boolean containsMapping(Object obj, Object obj2, Object obj3) { return obj3 != null && obj3.equals(get(obj, obj2)); } /* JADX INFO: Access modifiers changed from: private */ public boolean removeMapping(Object obj, Object obj2, Object obj3) { if (!containsMapping(obj, obj2, obj3)) { return false; } remove(obj, obj2); return true; } /* loaded from: classes2.dex */ abstract class TableSet extends Sets.ImprovedAbstractSet { final StandardTable this$0; private TableSet(StandardTable standardTable) { this.this$0 = standardTable; } @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set public boolean isEmpty() { return this.this$0.backingMap.isEmpty(); } @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set public void clear() { this.this$0.backingMap.clear(); } } @Override // com.google.common.collect.AbstractTable, com.google.common.collect.Table public Set> cellSet() { return super.cellSet(); } @Override // com.google.common.collect.AbstractTable Iterator> cellIterator() { return new CellIterator(); } /* loaded from: classes2.dex */ class CellIterator implements Iterator> { Iterator> columnIterator; Map.Entry> rowEntry; final Iterator>> rowIterator; final StandardTable this$0; private CellIterator(StandardTable standardTable) { this.this$0 = standardTable; this.rowIterator = standardTable.backingMap.entrySet().iterator(); this.columnIterator = Iterators.emptyModifiableIterator(); } @Override // java.util.Iterator public boolean hasNext() { return this.rowIterator.hasNext() || this.columnIterator.hasNext(); } @Override // java.util.Iterator public Table.Cell next() { if (!this.columnIterator.hasNext()) { Map.Entry> next = this.rowIterator.next(); this.rowEntry = next; this.columnIterator = next.getValue().entrySet().iterator(); } Map.Entry next2 = this.columnIterator.next(); return Tables.immutableCell(this.rowEntry.getKey(), next2.getKey(), next2.getValue()); } @Override // java.util.Iterator public void remove() { this.columnIterator.remove(); if (this.rowEntry.getValue().isEmpty()) { this.rowIterator.remove(); this.rowEntry = null; } } } @Override // com.google.common.collect.Table public Map row(R r) { return new Row(this, r); } /* JADX INFO: Access modifiers changed from: package-private */ /* loaded from: classes2.dex */ public class Row extends Maps.IteratorBasedAbstractMap { Map backingRowMap; final R rowKey; final StandardTable this$0; /* JADX INFO: Access modifiers changed from: package-private */ public Row(StandardTable standardTable, R r) { this.this$0 = standardTable; this.rowKey = (R) Preconditions.checkNotNull(r); } /* JADX INFO: Access modifiers changed from: package-private */ public Map backingRowMap() { Map map = this.backingRowMap; if (map != null && (!map.isEmpty() || !this.this$0.backingMap.containsKey(this.rowKey))) { return this.backingRowMap; } Map computeBackingRowMap = computeBackingRowMap(); this.backingRowMap = computeBackingRowMap; return computeBackingRowMap; } Map computeBackingRowMap() { return this.this$0.backingMap.get(this.rowKey); } void maintainEmptyInvariant() { if (backingRowMap() == null || !this.backingRowMap.isEmpty()) { return; } this.this$0.backingMap.remove(this.rowKey); this.backingRowMap = null; } @Override // java.util.AbstractMap, java.util.Map public boolean containsKey(Object obj) { Map backingRowMap = backingRowMap(); return (obj == null || backingRowMap == null || !Maps.safeContainsKey(backingRowMap, obj)) ? false : true; } @Override // java.util.AbstractMap, java.util.Map public V get(Object obj) { Map backingRowMap = backingRowMap(); if (obj == null || backingRowMap == null) { return null; } return (V) Maps.safeGet(backingRowMap, obj); } @Override // java.util.AbstractMap, java.util.Map public V put(C c, V v) { Preconditions.checkNotNull(c); Preconditions.checkNotNull(v); Map map = this.backingRowMap; if (map != null && !map.isEmpty()) { return this.backingRowMap.put(c, v); } return (V) this.this$0.put(this.rowKey, c, v); } @Override // java.util.AbstractMap, java.util.Map public V remove(Object obj) { Map backingRowMap = backingRowMap(); if (backingRowMap == null) { return null; } V v = (V) Maps.safeRemove(backingRowMap, obj); maintainEmptyInvariant(); return v; } @Override // com.google.common.collect.Maps.IteratorBasedAbstractMap, java.util.AbstractMap, java.util.Map public void clear() { Map backingRowMap = backingRowMap(); if (backingRowMap != null) { backingRowMap.clear(); } maintainEmptyInvariant(); } @Override // com.google.common.collect.Maps.IteratorBasedAbstractMap, java.util.AbstractMap, java.util.Map public int size() { Map backingRowMap = backingRowMap(); if (backingRowMap == null) { return 0; } return backingRowMap.size(); } /* JADX INFO: Access modifiers changed from: package-private */ @Override // com.google.common.collect.Maps.IteratorBasedAbstractMap public Iterator> entryIterator() { Map backingRowMap = backingRowMap(); if (backingRowMap == null) { return Iterators.emptyModifiableIterator(); } return new Iterator>(this, backingRowMap.entrySet().iterator()) { // from class: com.google.common.collect.StandardTable.Row.1 final Row this$1; final Iterator val$iterator; { this.this$1 = this; this.val$iterator = r2; } @Override // java.util.Iterator public boolean hasNext() { return this.val$iterator.hasNext(); } @Override // java.util.Iterator public Map.Entry next() { return this.this$1.wrapEntry((Map.Entry) this.val$iterator.next()); } @Override // java.util.Iterator public void remove() { this.val$iterator.remove(); this.this$1.maintainEmptyInvariant(); } }; } Map.Entry wrapEntry(Map.Entry entry) { return new ForwardingMapEntry(this, entry) { // from class: com.google.common.collect.StandardTable.Row.2 final Map.Entry val$entry; { this.val$entry = entry; } /* JADX WARN: Multi-variable type inference failed */ @Override // com.google.common.collect.ForwardingMapEntry, java.util.Map.Entry public V setValue(V v) { return (V) super.setValue(Preconditions.checkNotNull(v)); } @Override // com.google.common.collect.ForwardingMapEntry, java.util.Map.Entry public boolean equals(Object obj) { return standardEquals(obj); } /* JADX INFO: Access modifiers changed from: protected */ @Override // com.google.common.collect.ForwardingMapEntry, com.google.common.collect.ForwardingObject public Map.Entry delegate() { return this.val$entry; } }; } } @Override // com.google.common.collect.Table public Map column(C c) { return new Column(this, c); } /* JADX INFO: Access modifiers changed from: package-private */ /* loaded from: classes2.dex */ public class Column extends Maps.ViewCachingAbstractMap { final C columnKey; final StandardTable this$0; Column(StandardTable standardTable, C c) { this.this$0 = standardTable; this.columnKey = (C) Preconditions.checkNotNull(c); } @Override // java.util.AbstractMap, java.util.Map public V put(R r, V v) { return (V) this.this$0.put(r, this.columnKey, v); } @Override // java.util.AbstractMap, java.util.Map public V get(Object obj) { return (V) this.this$0.get(obj, this.columnKey); } @Override // java.util.AbstractMap, java.util.Map public boolean containsKey(Object obj) { return this.this$0.contains(obj, this.columnKey); } @Override // java.util.AbstractMap, java.util.Map public V remove(Object obj) { return (V) this.this$0.remove(obj, this.columnKey); } boolean removeFromColumnIf(Predicate> predicate) { Iterator>> it = this.this$0.backingMap.entrySet().iterator(); boolean z = false; while (it.hasNext()) { Map.Entry> next = it.next(); Map value = next.getValue(); V v = value.get(this.columnKey); if (v != null && predicate.apply(Maps.immutableEntry(next.getKey(), v))) { value.remove(this.columnKey); if (value.isEmpty()) { it.remove(); } z = true; } } return z; } @Override // com.google.common.collect.Maps.ViewCachingAbstractMap Set> createEntrySet() { return new EntrySet(); } /* loaded from: classes2.dex */ class EntrySet extends Sets.ImprovedAbstractSet> { final Column this$1; private EntrySet(Column column) { this.this$1 = column; } @Override // java.util.AbstractCollection, java.util.Collection, java.lang.Iterable, java.util.Set public Iterator> iterator() { return new EntrySetIterator(); } @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set public int size() { Iterator> it = this.this$1.this$0.backingMap.values().iterator(); int i = 0; while (it.hasNext()) { if (it.next().containsKey(this.this$1.columnKey)) { i++; } } return i; } @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set public boolean isEmpty() { return !this.this$1.this$0.containsColumn(this.this$1.columnKey); } @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set public void clear() { this.this$1.removeFromColumnIf(Predicates.alwaysTrue()); } @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set public boolean contains(Object obj) { if (!(obj instanceof Map.Entry)) { return false; } Map.Entry entry = (Map.Entry) obj; return this.this$1.this$0.containsMapping(entry.getKey(), this.this$1.columnKey, entry.getValue()); } @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set public boolean remove(Object obj) { if (!(obj instanceof Map.Entry)) { return false; } Map.Entry entry = (Map.Entry) obj; return this.this$1.this$0.removeMapping(entry.getKey(), this.this$1.columnKey, entry.getValue()); } @Override // com.google.common.collect.Sets.ImprovedAbstractSet, java.util.AbstractCollection, java.util.Collection, java.util.Set public boolean retainAll(Collection collection) { return this.this$1.removeFromColumnIf(Predicates.not(Predicates.in(collection))); } } /* loaded from: classes2.dex */ class EntrySetIterator extends AbstractIterator> { final Iterator>> iterator; final Column this$1; private EntrySetIterator(Column column) { this.this$1 = column; this.iterator = column.this$0.backingMap.entrySet().iterator(); } /* JADX INFO: Access modifiers changed from: protected */ @Override // com.google.common.collect.AbstractIterator public Map.Entry computeNext() { while (this.iterator.hasNext()) { Map.Entry> next = this.iterator.next(); if (next.getValue().containsKey(this.this$1.columnKey)) { return new AbstractMapEntry(this, next) { // from class: com.google.common.collect.StandardTable.Column.EntrySetIterator.1EntryImpl final EntrySetIterator this$2; final Map.Entry val$entry; { this.this$2 = this; this.val$entry = next; } @Override // com.google.common.collect.AbstractMapEntry, java.util.Map.Entry public R getKey() { return (R) this.val$entry.getKey(); } @Override // com.google.common.collect.AbstractMapEntry, java.util.Map.Entry public V getValue() { return (V) ((Map) this.val$entry.getValue()).get(this.this$2.this$1.columnKey); } /* JADX WARN: Multi-variable type inference failed */ @Override // com.google.common.collect.AbstractMapEntry, java.util.Map.Entry public V setValue(V v) { return (V) ((Map) this.val$entry.getValue()).put(this.this$2.this$1.columnKey, Preconditions.checkNotNull(v)); } }; } } return endOfData(); } } @Override // com.google.common.collect.Maps.ViewCachingAbstractMap Set createKeySet() { return new KeySet(this); } /* loaded from: classes2.dex */ class KeySet extends Maps.KeySet { final Column this$1; /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ KeySet(Column column) { super(column); this.this$1 = column; } @Override // com.google.common.collect.Maps.KeySet, java.util.AbstractCollection, java.util.Collection, java.util.Set public boolean contains(Object obj) { return this.this$1.this$0.contains(obj, this.this$1.columnKey); } @Override // com.google.common.collect.Maps.KeySet, java.util.AbstractCollection, java.util.Collection, java.util.Set public boolean remove(Object obj) { return this.this$1.this$0.remove(obj, this.this$1.columnKey) != null; } @Override // com.google.common.collect.Sets.ImprovedAbstractSet, java.util.AbstractCollection, java.util.Collection, java.util.Set public boolean retainAll(Collection collection) { return this.this$1.removeFromColumnIf(Maps.keyPredicateOnEntries(Predicates.not(Predicates.in(collection)))); } } @Override // com.google.common.collect.Maps.ViewCachingAbstractMap Collection createValues() { return new Values(this); } /* loaded from: classes2.dex */ class Values extends Maps.Values { final Column this$1; /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ Values(Column column) { super(column); this.this$1 = column; } @Override // com.google.common.collect.Maps.Values, java.util.AbstractCollection, java.util.Collection public boolean remove(Object obj) { return obj != null && this.this$1.removeFromColumnIf(Maps.valuePredicateOnEntries(Predicates.equalTo(obj))); } @Override // com.google.common.collect.Maps.Values, java.util.AbstractCollection, java.util.Collection public boolean removeAll(Collection collection) { return this.this$1.removeFromColumnIf(Maps.valuePredicateOnEntries(Predicates.in(collection))); } @Override // com.google.common.collect.Maps.Values, java.util.AbstractCollection, java.util.Collection public boolean retainAll(Collection collection) { return this.this$1.removeFromColumnIf(Maps.valuePredicateOnEntries(Predicates.not(Predicates.in(collection)))); } } } @Override // com.google.common.collect.AbstractTable, com.google.common.collect.Table public Set rowKeySet() { return rowMap().keySet(); } @Override // com.google.common.collect.AbstractTable, com.google.common.collect.Table public Set columnKeySet() { Set set = this.columnKeySet; if (set != null) { return set; } ColumnKeySet columnKeySet = new ColumnKeySet(); this.columnKeySet = columnKeySet; return columnKeySet; } /* JADX INFO: Access modifiers changed from: package-private */ /* loaded from: classes2.dex */ public class ColumnKeySet extends TableSet { final StandardTable this$0; /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ private ColumnKeySet(StandardTable standardTable) { super(); this.this$0 = standardTable; } @Override // java.util.AbstractCollection, java.util.Collection, java.lang.Iterable, java.util.Set public Iterator iterator() { return this.this$0.createColumnKeyIterator(); } @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set public int size() { return Iterators.size(iterator()); } @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set public boolean remove(Object obj) { boolean z = false; if (obj == null) { return false; } Iterator> it = this.this$0.backingMap.values().iterator(); while (it.hasNext()) { Map next = it.next(); if (next.keySet().remove(obj)) { if (next.isEmpty()) { it.remove(); } z = true; } } return z; } @Override // com.google.common.collect.Sets.ImprovedAbstractSet, java.util.AbstractSet, java.util.AbstractCollection, java.util.Collection, java.util.Set public boolean removeAll(Collection collection) { Preconditions.checkNotNull(collection); Iterator> it = this.this$0.backingMap.values().iterator(); boolean z = false; while (it.hasNext()) { Map next = it.next(); if (Iterators.removeAll(next.keySet().iterator(), collection)) { if (next.isEmpty()) { it.remove(); } z = true; } } return z; } @Override // com.google.common.collect.Sets.ImprovedAbstractSet, java.util.AbstractCollection, java.util.Collection, java.util.Set public boolean retainAll(Collection collection) { Preconditions.checkNotNull(collection); Iterator> it = this.this$0.backingMap.values().iterator(); boolean z = false; while (it.hasNext()) { Map next = it.next(); if (next.keySet().retainAll(collection)) { if (next.isEmpty()) { it.remove(); } z = true; } } return z; } @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set public boolean contains(Object obj) { return this.this$0.containsColumn(obj); } } Iterator createColumnKeyIterator() { return new ColumnKeyIterator(); } /* JADX INFO: Access modifiers changed from: package-private */ /* loaded from: classes2.dex */ public class ColumnKeyIterator extends AbstractIterator { Iterator> entryIterator; final Iterator> mapIterator; final Map seen; final StandardTable this$0; private ColumnKeyIterator(StandardTable standardTable) { this.this$0 = standardTable; this.seen = standardTable.factory.get(); this.mapIterator = standardTable.backingMap.values().iterator(); this.entryIterator = Iterators.emptyIterator(); } @Override // com.google.common.collect.AbstractIterator protected C computeNext() { while (true) { if (this.entryIterator.hasNext()) { Map.Entry next = this.entryIterator.next(); if (!this.seen.containsKey(next.getKey())) { this.seen.put(next.getKey(), next.getValue()); return next.getKey(); } } else if (this.mapIterator.hasNext()) { this.entryIterator = this.mapIterator.next().entrySet().iterator(); } else { return endOfData(); } } } } @Override // com.google.common.collect.AbstractTable, com.google.common.collect.Table public Collection values() { return super.values(); } @Override // com.google.common.collect.Table public Map> rowMap() { Map> map = this.rowMap; if (map != null) { return map; } Map> createRowMap = createRowMap(); this.rowMap = createRowMap; return createRowMap; } Map> createRowMap() { return new RowMap(this); } /* JADX INFO: Access modifiers changed from: package-private */ /* loaded from: classes2.dex */ public class RowMap extends Maps.ViewCachingAbstractMap> { final StandardTable this$0; /* JADX INFO: Access modifiers changed from: package-private */ public RowMap(StandardTable standardTable) { this.this$0 = standardTable; } @Override // java.util.AbstractMap, java.util.Map public boolean containsKey(Object obj) { return this.this$0.containsRow(obj); } @Override // java.util.AbstractMap, java.util.Map public Map get(Object obj) { if (this.this$0.containsRow(obj)) { return this.this$0.row(obj); } return null; } @Override // java.util.AbstractMap, java.util.Map public Map remove(Object obj) { if (obj == null) { return null; } return this.this$0.backingMap.remove(obj); } @Override // com.google.common.collect.Maps.ViewCachingAbstractMap protected Set>> createEntrySet() { return new EntrySet(this); } /* JADX INFO: Access modifiers changed from: package-private */ /* loaded from: classes2.dex */ public class EntrySet extends TableSet { final RowMap this$1; /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ EntrySet(RowMap rowMap) { super(); this.this$1 = rowMap; } @Override // java.util.AbstractCollection, java.util.Collection, java.lang.Iterable, java.util.Set public Iterator>> iterator() { return Maps.asMapEntryIterator(this.this$1.this$0.backingMap.keySet(), new Function>(this) { // from class: com.google.common.collect.StandardTable.RowMap.EntrySet.1 final EntrySet this$2; { this.this$2 = this; } @Override // com.google.common.base.Function public /* bridge */ /* synthetic */ Object apply(Object obj) { return apply((AnonymousClass1) obj); } @Override // com.google.common.base.Function public Map apply(R r) { return this.this$2.this$1.this$0.row(r); } }); } @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set public int size() { return this.this$1.this$0.backingMap.size(); } @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set public boolean contains(Object obj) { if (!(obj instanceof Map.Entry)) { return false; } Map.Entry entry = (Map.Entry) obj; return entry.getKey() != null && (entry.getValue() instanceof Map) && Collections2.safeContains(this.this$1.this$0.backingMap.entrySet(), entry); } @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set public boolean remove(Object obj) { if (!(obj instanceof Map.Entry)) { return false; } Map.Entry entry = (Map.Entry) obj; return entry.getKey() != null && (entry.getValue() instanceof Map) && this.this$1.this$0.backingMap.entrySet().remove(entry); } } } @Override // com.google.common.collect.Table public Map> columnMap() { StandardTable.ColumnMap columnMap = this.columnMap; if (columnMap != null) { return columnMap; } StandardTable.ColumnMap columnMap2 = new ColumnMap(); this.columnMap = columnMap2; return columnMap2; } /* JADX INFO: Access modifiers changed from: package-private */ /* loaded from: classes2.dex */ public class ColumnMap extends Maps.ViewCachingAbstractMap> { final StandardTable this$0; private ColumnMap(StandardTable standardTable) { this.this$0 = standardTable; } @Override // java.util.AbstractMap, java.util.Map public Map get(Object obj) { if (this.this$0.containsColumn(obj)) { return this.this$0.column(obj); } return null; } @Override // java.util.AbstractMap, java.util.Map public boolean containsKey(Object obj) { return this.this$0.containsColumn(obj); } @Override // java.util.AbstractMap, java.util.Map public Map remove(Object obj) { if (this.this$0.containsColumn(obj)) { return this.this$0.removeColumn(obj); } return null; } @Override // com.google.common.collect.Maps.ViewCachingAbstractMap public Set>> createEntrySet() { return new ColumnMapEntrySet(this); } @Override // com.google.common.collect.Maps.ViewCachingAbstractMap, java.util.AbstractMap, java.util.Map public Set keySet() { return this.this$0.columnKeySet(); } @Override // com.google.common.collect.Maps.ViewCachingAbstractMap Collection> createValues() { return new ColumnMapValues(this); } /* JADX INFO: Access modifiers changed from: package-private */ /* loaded from: classes2.dex */ public class ColumnMapEntrySet extends TableSet { final ColumnMap this$1; /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ ColumnMapEntrySet(ColumnMap columnMap) { super(); this.this$1 = columnMap; } @Override // java.util.AbstractCollection, java.util.Collection, java.lang.Iterable, java.util.Set public Iterator>> iterator() { return Maps.asMapEntryIterator(this.this$1.this$0.columnKeySet(), new Function>(this) { // from class: com.google.common.collect.StandardTable.ColumnMap.ColumnMapEntrySet.1 final ColumnMapEntrySet this$2; { this.this$2 = this; } @Override // com.google.common.base.Function public /* bridge */ /* synthetic */ Object apply(Object obj) { return apply((AnonymousClass1) obj); } @Override // com.google.common.base.Function public Map apply(C c) { return this.this$2.this$1.this$0.column(c); } }); } @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set public int size() { return this.this$1.this$0.columnKeySet().size(); } @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set public boolean contains(Object obj) { if (!(obj instanceof Map.Entry)) { return false; } Map.Entry entry = (Map.Entry) obj; if (!this.this$1.this$0.containsColumn(entry.getKey())) { return false; } return this.this$1.get(entry.getKey()).equals(entry.getValue()); } @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set public boolean remove(Object obj) { if (!contains(obj)) { return false; } this.this$1.this$0.removeColumn(((Map.Entry) obj).getKey()); return true; } @Override // com.google.common.collect.Sets.ImprovedAbstractSet, java.util.AbstractSet, java.util.AbstractCollection, java.util.Collection, java.util.Set public boolean removeAll(Collection collection) { Preconditions.checkNotNull(collection); return Sets.removeAllImpl(this, collection.iterator()); } /* JADX WARN: Multi-variable type inference failed */ @Override // com.google.common.collect.Sets.ImprovedAbstractSet, java.util.AbstractCollection, java.util.Collection, java.util.Set public boolean retainAll(Collection collection) { Preconditions.checkNotNull(collection); Iterator it = Lists.newArrayList(this.this$1.this$0.columnKeySet().iterator()).iterator(); boolean z = false; while (it.hasNext()) { Object next = it.next(); if (!collection.contains(Maps.immutableEntry(next, this.this$1.this$0.column(next)))) { this.this$1.this$0.removeColumn(next); z = true; } } return z; } } /* loaded from: classes2.dex */ class ColumnMapValues extends Maps.Values> { final ColumnMap this$1; /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ ColumnMapValues(ColumnMap columnMap) { super(columnMap); this.this$1 = columnMap; } @Override // com.google.common.collect.Maps.Values, java.util.AbstractCollection, java.util.Collection public boolean remove(Object obj) { for (Map.Entry> entry : this.this$1.entrySet()) { if (entry.getValue().equals(obj)) { this.this$1.this$0.removeColumn(entry.getKey()); return true; } } return false; } /* JADX WARN: Multi-variable type inference failed */ @Override // com.google.common.collect.Maps.Values, java.util.AbstractCollection, java.util.Collection public boolean removeAll(Collection collection) { Preconditions.checkNotNull(collection); Iterator it = Lists.newArrayList(this.this$1.this$0.columnKeySet().iterator()).iterator(); boolean z = false; while (it.hasNext()) { Object next = it.next(); if (collection.contains(this.this$1.this$0.column(next))) { this.this$1.this$0.removeColumn(next); z = true; } } return z; } /* JADX WARN: Multi-variable type inference failed */ @Override // com.google.common.collect.Maps.Values, java.util.AbstractCollection, java.util.Collection public boolean retainAll(Collection collection) { Preconditions.checkNotNull(collection); Iterator it = Lists.newArrayList(this.this$1.this$0.columnKeySet().iterator()).iterator(); boolean z = false; while (it.hasNext()) { Object next = it.next(); if (!collection.contains(this.this$1.this$0.column(next))) { this.this$1.this$0.removeColumn(next); z = true; } } return z; } } } }