package com.google.common.collect; import com.google.common.collect.ImmutableSet; import java.io.Serializable; /* loaded from: classes.dex */ final class ImmutableMapKeySet extends ImmutableSet.Indexed { private final ImmutableMap a; private static class KeySetSerializedForm implements Serializable { final ImmutableMap a; KeySetSerializedForm(ImmutableMap immutableMap) { this.a = immutableMap; } Object readResolve() { return this.a.keySet(); } } ImmutableMapKeySet(ImmutableMap immutableMap) { this.a = immutableMap; } @Override // com.google.common.collect.ImmutableCollection, java.util.AbstractCollection, java.util.Collection, java.util.Set public boolean contains(Object obj) { return this.a.containsKey(obj); } @Override // com.google.common.collect.ImmutableSet.Indexed K get(int i) { return this.a.entrySet().asList().get(i).getKey(); } @Override // com.google.common.collect.ImmutableCollection boolean isPartialView() { return true; } @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set public int size() { return this.a.size(); } @Override // com.google.common.collect.ImmutableSet, com.google.common.collect.ImmutableCollection Object writeReplace() { return new KeySetSerializedForm(this.a); } @Override // com.google.common.collect.ImmutableSet.Indexed, com.google.common.collect.ImmutableSet, com.google.common.collect.ImmutableCollection, java.util.AbstractCollection, java.util.Collection, java.lang.Iterable, java.util.Set, java.util.NavigableSet public UnmodifiableIterator iterator() { return this.a.keyIterator(); } }