what-the-bank/sources/com/google/common/collect/EmptyContiguousSet.java

160 lines
6.0 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.google.common.collect;
import java.io.Serializable;
import java.lang.Comparable;
import java.util.Iterator;
import java.util.NoSuchElementException;
import java.util.Set;
import okhttp3.HttpUrl;
/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes2.dex */
public final class EmptyContiguousSet<C extends Comparable> extends ContiguousSet<C> {
@Override // com.google.common.collect.ImmutableCollection, java.util.AbstractCollection, java.util.Collection, java.util.Set
public final boolean contains(Object obj) {
return false;
}
@Override // com.google.common.collect.ImmutableSet, java.util.Collection, java.util.Set
public final int hashCode() {
return 0;
}
/* JADX INFO: Access modifiers changed from: package-private */
@Override // com.google.common.collect.ContiguousSet, com.google.common.collect.ImmutableSortedSet
public final ContiguousSet<C> headSetImpl(C c, boolean z) {
return this;
}
/* JADX INFO: Access modifiers changed from: package-private */
@Override // com.google.common.collect.ImmutableSortedSet
public final int indexOf(Object obj) {
return -1;
}
@Override // com.google.common.collect.ContiguousSet
public final ContiguousSet<C> intersection(ContiguousSet<C> contiguousSet) {
return this;
}
@Override // java.util.AbstractCollection, java.util.Collection, java.util.Set
public final boolean isEmpty() {
return true;
}
@Override // com.google.common.collect.ImmutableSet
final boolean isHashCodeFast() {
return true;
}
/* JADX INFO: Access modifiers changed from: package-private */
@Override // com.google.common.collect.ImmutableCollection
public final boolean isPartialView() {
return false;
}
@Override // java.util.AbstractCollection, java.util.Collection, java.util.Set
public final int size() {
return 0;
}
/* JADX INFO: Access modifiers changed from: package-private */
@Override // com.google.common.collect.ContiguousSet, com.google.common.collect.ImmutableSortedSet
public final ContiguousSet<C> subSetImpl(C c, boolean z, C c2, boolean z2) {
return this;
}
/* JADX INFO: Access modifiers changed from: package-private */
@Override // com.google.common.collect.ContiguousSet, com.google.common.collect.ImmutableSortedSet
public final ContiguousSet<C> tailSetImpl(C c, boolean z) {
return this;
}
@Override // com.google.common.collect.ImmutableSortedSet, java.util.NavigableSet
public final /* bridge */ /* synthetic */ Iterator descendingIterator() {
return descendingIterator();
}
@Override // com.google.common.collect.ImmutableSortedSet, 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 final /* bridge */ /* synthetic */ Iterator iterator() {
return iterator();
}
/* JADX INFO: Access modifiers changed from: package-private */
public EmptyContiguousSet(DiscreteDomain<C> discreteDomain) {
super(discreteDomain);
}
@Override // com.google.common.collect.ImmutableSortedSet, java.util.SortedSet
public final C first() {
throw new NoSuchElementException();
}
@Override // com.google.common.collect.ImmutableSortedSet, java.util.SortedSet
public final C last() {
throw new NoSuchElementException();
}
@Override // com.google.common.collect.ContiguousSet
public final Range<C> range() {
throw new NoSuchElementException();
}
@Override // com.google.common.collect.ContiguousSet
public final Range<C> range(BoundType boundType, BoundType boundType2) {
throw new NoSuchElementException();
}
@Override // com.google.common.collect.ImmutableSortedSet, 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 final UnmodifiableIterator<C> iterator() {
return Iterators.emptyIterator();
}
@Override // com.google.common.collect.ImmutableSortedSet, java.util.NavigableSet
public final UnmodifiableIterator<C> descendingIterator() {
return Iterators.emptyIterator();
}
@Override // com.google.common.collect.ImmutableSet, com.google.common.collect.ImmutableCollection
public final ImmutableList<C> asList() {
return ImmutableList.of();
}
@Override // com.google.common.collect.ImmutableSet, java.util.Collection, java.util.Set
public final boolean equals(Object obj) {
if (obj instanceof Set) {
return ((Set) obj).isEmpty();
}
return false;
}
/* loaded from: classes2.dex */
static final class SerializedForm<C extends Comparable> implements Serializable {
private static final long serialVersionUID = 0;
private final DiscreteDomain<C> domain;
private SerializedForm(DiscreteDomain<C> discreteDomain) {
this.domain = discreteDomain;
}
private Object readResolve() {
return new EmptyContiguousSet(this.domain);
}
}
@Override // com.google.common.collect.ImmutableSortedSet, com.google.common.collect.ImmutableSet, com.google.common.collect.ImmutableCollection
final Object writeReplace() {
return new SerializedForm(this.domain);
}
@Override // com.google.common.collect.ContiguousSet, com.google.common.collect.ImmutableSortedSet
final ImmutableSortedSet<C> createDescendingSet() {
return ImmutableSortedSet.emptySet(Ordering.natural().reverse());
}
@Override // com.google.common.collect.ContiguousSet, java.util.AbstractCollection
public final String toString() {
return HttpUrl.PATH_SEGMENT_ENCODE_SET_URI;
}
}