package com.google.common.collect; import com.google.common.base.Preconditions; import javax.annotation.CheckForNull; /* JADX INFO: Access modifiers changed from: package-private */ @ElementTypesAreNonnullByDefault /* loaded from: classes3.dex */ public final class SingletonImmutableSet extends ImmutableSet { final transient E element; /* JADX INFO: Access modifiers changed from: package-private */ @Override // com.google.common.collect.ImmutableCollection public boolean isPartialView() { return false; } @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set public int size() { return 1; } /* JADX INFO: Access modifiers changed from: package-private */ public SingletonImmutableSet(E e) { this.element = (E) Preconditions.checkNotNull(e); } @Override // com.google.common.collect.ImmutableCollection, java.util.AbstractCollection, java.util.Collection, java.util.Set public boolean contains(@CheckForNull Object obj) { return this.element.equals(obj); } @Override // 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, com.google.common.collect.SortedIterable public UnmodifiableIterator iterator() { return Iterators.singletonIterator(this.element); } @Override // com.google.common.collect.ImmutableSet, com.google.common.collect.ImmutableCollection public ImmutableList asList() { return ImmutableList.of((Object) this.element); } /* JADX INFO: Access modifiers changed from: package-private */ @Override // com.google.common.collect.ImmutableCollection public int copyIntoArray(Object[] objArr, int i) { objArr[i] = this.element; return i + 1; } @Override // com.google.common.collect.ImmutableSet, java.util.Collection, java.util.Set public final int hashCode() { return this.element.hashCode(); } @Override // java.util.AbstractCollection public String toString() { String obj = this.element.toString(); return new StringBuilder(String.valueOf(obj).length() + 2).append('[').append(obj).append(']').toString(); } }