what-the-bank/sources/com/google/common/collect/UnmodifiableSortedMultiset....

88 lines
3.7 KiB
Java

package com.google.common.collect;
import com.google.common.collect.Multiset;
import com.google.common.collect.Multisets;
import java.util.Comparator;
import java.util.NavigableSet;
/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes2.dex */
public final class UnmodifiableSortedMultiset<E> extends Multisets.UnmodifiableMultiset<E> implements SortedMultiset<E> {
private static final long serialVersionUID = 0;
private transient UnmodifiableSortedMultiset<E> descendingMultiset;
/* JADX INFO: Access modifiers changed from: package-private */
public UnmodifiableSortedMultiset(SortedMultiset<E> sortedMultiset) {
super(sortedMultiset);
}
/* JADX INFO: Access modifiers changed from: protected */
@Override // com.google.common.collect.Multisets.UnmodifiableMultiset, com.google.common.collect.ForwardingMultiset, com.google.common.collect.ForwardingCollection, com.google.common.collect.ForwardingObject
public final SortedMultiset<E> delegate() {
return (SortedMultiset) super.delegate();
}
@Override // com.google.common.collect.SortedMultiset, com.google.common.collect.SortedIterable
public final Comparator<? super E> comparator() {
return delegate().comparator();
}
/* JADX INFO: Access modifiers changed from: package-private */
@Override // com.google.common.collect.Multisets.UnmodifiableMultiset
public final NavigableSet<E> createElementSet() {
return Sets.unmodifiableNavigableSet(delegate().elementSet());
}
@Override // com.google.common.collect.Multisets.UnmodifiableMultiset, com.google.common.collect.ForwardingMultiset, com.google.common.collect.Multiset
public final NavigableSet<E> elementSet() {
return (NavigableSet) super.elementSet();
}
@Override // com.google.common.collect.SortedMultiset
public final SortedMultiset<E> descendingMultiset() {
UnmodifiableSortedMultiset<E> unmodifiableSortedMultiset = this.descendingMultiset;
if (unmodifiableSortedMultiset != null) {
return unmodifiableSortedMultiset;
}
UnmodifiableSortedMultiset<E> unmodifiableSortedMultiset2 = new UnmodifiableSortedMultiset<>(delegate().descendingMultiset());
unmodifiableSortedMultiset2.descendingMultiset = this;
this.descendingMultiset = unmodifiableSortedMultiset2;
return unmodifiableSortedMultiset2;
}
@Override // com.google.common.collect.SortedMultiset
public final Multiset.Entry<E> firstEntry() {
return delegate().firstEntry();
}
@Override // com.google.common.collect.SortedMultiset
public final Multiset.Entry<E> lastEntry() {
return delegate().lastEntry();
}
@Override // com.google.common.collect.SortedMultiset
public final Multiset.Entry<E> pollFirstEntry() {
throw new UnsupportedOperationException();
}
@Override // com.google.common.collect.SortedMultiset
public final Multiset.Entry<E> pollLastEntry() {
throw new UnsupportedOperationException();
}
@Override // com.google.common.collect.SortedMultiset
public final SortedMultiset<E> headMultiset(E e, BoundType boundType) {
return Multisets.unmodifiableSortedMultiset(delegate().headMultiset(e, boundType));
}
@Override // com.google.common.collect.SortedMultiset
public final SortedMultiset<E> subMultiset(E e, BoundType boundType, E e2, BoundType boundType2) {
return Multisets.unmodifiableSortedMultiset(delegate().subMultiset(e, boundType, e2, boundType2));
}
@Override // com.google.common.collect.SortedMultiset
public final SortedMultiset<E> tailMultiset(E e, BoundType boundType) {
return Multisets.unmodifiableSortedMultiset(delegate().tailMultiset(e, boundType));
}
}