package com.google.common.collect; import com.google.common.collect.RegularImmutableMap; import java.util.Map; import javax.annotation.CheckForNull; @ElementTypesAreNonnullByDefault /* loaded from: classes3.dex */ final class RegularImmutableBiMap extends ImmutableBiMap { static final RegularImmutableBiMap EMPTY = new RegularImmutableBiMap<>(); final transient Object[] alternatingKeysAndValues; private final transient RegularImmutableBiMap inverse; @CheckForNull private final transient Object keyHashTable; private final transient int keyOffset; private final transient int size; @Override // com.google.common.collect.ImmutableBiMap, com.google.common.collect.BiMap public ImmutableBiMap inverse() { return this.inverse; } /* JADX INFO: Access modifiers changed from: package-private */ @Override // com.google.common.collect.ImmutableMap public boolean isPartialView() { return false; } @Override // java.util.Map public int size() { return this.size; } /* JADX WARN: Multi-variable type inference failed */ private RegularImmutableBiMap() { this.keyHashTable = null; this.alternatingKeysAndValues = new Object[0]; this.keyOffset = 0; this.size = 0; this.inverse = this; } /* JADX INFO: Access modifiers changed from: package-private */ public RegularImmutableBiMap(Object[] objArr, int i) { this.alternatingKeysAndValues = objArr; this.size = i; this.keyOffset = 0; int chooseTableSize = i >= 2 ? ImmutableSet.chooseTableSize(i) : 0; this.keyHashTable = RegularImmutableMap.createHashTableOrThrow(objArr, i, chooseTableSize, 0); this.inverse = new RegularImmutableBiMap<>(RegularImmutableMap.createHashTableOrThrow(objArr, i, chooseTableSize, 1), objArr, i, this); } private RegularImmutableBiMap(@CheckForNull Object obj, Object[] objArr, int i, RegularImmutableBiMap regularImmutableBiMap) { this.keyHashTable = obj; this.alternatingKeysAndValues = objArr; this.keyOffset = 1; this.size = i; this.inverse = regularImmutableBiMap; } @Override // com.google.common.collect.ImmutableMap, java.util.Map @CheckForNull public V get(@CheckForNull Object obj) { V v = (V) RegularImmutableMap.get(this.keyHashTable, this.alternatingKeysAndValues, this.size, this.keyOffset, obj); if (v == null) { return null; } return v; } @Override // com.google.common.collect.ImmutableMap ImmutableSet> createEntrySet() { return new RegularImmutableMap.EntrySet(this, this.alternatingKeysAndValues, this.keyOffset, this.size); } @Override // com.google.common.collect.ImmutableMap ImmutableSet createKeySet() { return new RegularImmutableMap.KeySet(this, new RegularImmutableMap.KeysOrValuesAsList(this.alternatingKeysAndValues, this.keyOffset, this.size)); } }