110 lines
4.5 KiB
Java
110 lines
4.5 KiB
Java
package com.google.common.collect;
|
|
|
|
import java.util.Iterator;
|
|
import java.util.NavigableSet;
|
|
|
|
/* loaded from: classes2.dex */
|
|
final class DescendingImmutableSortedSet<E> extends ImmutableSortedSet<E> {
|
|
private final ImmutableSortedSet<E> forward;
|
|
|
|
@Override // com.google.common.collect.ImmutableSortedSet, java.util.NavigableSet
|
|
public final /* bridge */ /* synthetic */ Iterator descendingIterator() {
|
|
return descendingIterator();
|
|
}
|
|
|
|
@Override // com.google.common.collect.ImmutableSortedSet, java.util.NavigableSet
|
|
public final /* bridge */ /* synthetic */ NavigableSet descendingSet() {
|
|
return descendingSet();
|
|
}
|
|
|
|
@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 DescendingImmutableSortedSet(ImmutableSortedSet<E> immutableSortedSet) {
|
|
super(Ordering.from(immutableSortedSet.comparator()).reverse());
|
|
this.forward = immutableSortedSet;
|
|
}
|
|
|
|
@Override // com.google.common.collect.ImmutableCollection, java.util.AbstractCollection, java.util.Collection, java.util.Set
|
|
public final boolean contains(Object obj) {
|
|
return this.forward.contains(obj);
|
|
}
|
|
|
|
@Override // java.util.AbstractCollection, java.util.Collection, java.util.Set
|
|
public final int size() {
|
|
return this.forward.size();
|
|
}
|
|
|
|
@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<E> iterator() {
|
|
return this.forward.descendingIterator();
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
@Override // com.google.common.collect.ImmutableSortedSet
|
|
public final ImmutableSortedSet<E> headSetImpl(E e, boolean z) {
|
|
return this.forward.tailSet((ImmutableSortedSet<E>) e, z).descendingSet();
|
|
}
|
|
|
|
@Override // com.google.common.collect.ImmutableSortedSet
|
|
final ImmutableSortedSet<E> subSetImpl(E e, boolean z, E e2, boolean z2) {
|
|
return this.forward.subSet((boolean) e2, z2, (boolean) e, z).descendingSet();
|
|
}
|
|
|
|
@Override // com.google.common.collect.ImmutableSortedSet
|
|
final ImmutableSortedSet<E> tailSetImpl(E e, boolean z) {
|
|
return this.forward.headSet((ImmutableSortedSet<E>) e, z).descendingSet();
|
|
}
|
|
|
|
@Override // com.google.common.collect.ImmutableSortedSet, java.util.NavigableSet
|
|
public final UnmodifiableIterator<E> descendingIterator() {
|
|
return this.forward.iterator();
|
|
}
|
|
|
|
@Override // com.google.common.collect.ImmutableSortedSet
|
|
final ImmutableSortedSet<E> createDescendingSet() {
|
|
throw new AssertionError("should never be called");
|
|
}
|
|
|
|
@Override // com.google.common.collect.ImmutableSortedSet, java.util.NavigableSet
|
|
public final E lower(E e) {
|
|
return this.forward.higher(e);
|
|
}
|
|
|
|
@Override // com.google.common.collect.ImmutableSortedSet, java.util.NavigableSet
|
|
public final E floor(E e) {
|
|
return this.forward.ceiling(e);
|
|
}
|
|
|
|
@Override // com.google.common.collect.ImmutableSortedSet, java.util.NavigableSet
|
|
public final E ceiling(E e) {
|
|
return this.forward.floor(e);
|
|
}
|
|
|
|
@Override // com.google.common.collect.ImmutableSortedSet, java.util.NavigableSet
|
|
public final E higher(E e) {
|
|
return this.forward.lower(e);
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
@Override // com.google.common.collect.ImmutableSortedSet
|
|
public final int indexOf(Object obj) {
|
|
int indexOf = this.forward.indexOf(obj);
|
|
return indexOf == -1 ? indexOf : (size() - 1) - indexOf;
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
@Override // com.google.common.collect.ImmutableCollection
|
|
public final boolean isPartialView() {
|
|
return this.forward.isPartialView();
|
|
}
|
|
|
|
@Override // com.google.common.collect.ImmutableSortedSet, java.util.NavigableSet
|
|
public final ImmutableSortedSet<E> descendingSet() {
|
|
return this.forward;
|
|
}
|
|
}
|