package com.google.common.collect; import com.google.common.collect.Sets; import java.util.Iterator; import java.util.NavigableSet; import java.util.SortedSet; /* loaded from: classes2.dex */ public abstract class ForwardingNavigableSet extends ForwardingSortedSet implements NavigableSet { /* JADX INFO: Access modifiers changed from: protected */ @Override // com.google.common.collect.ForwardingSortedSet, com.google.common.collect.ForwardingSet, com.google.common.collect.ForwardingCollection, com.google.common.collect.ForwardingObject public abstract NavigableSet delegate(); @Override // java.util.NavigableSet public E lower(E e) { return delegate().lower(e); } protected E standardLower(E e) { return (E) Iterators.getNext(headSet(e, false).descendingIterator(), null); } @Override // java.util.NavigableSet public E floor(E e) { return delegate().floor(e); } protected E standardFloor(E e) { return (E) Iterators.getNext(headSet(e, true).descendingIterator(), null); } @Override // java.util.NavigableSet public E ceiling(E e) { return delegate().ceiling(e); } protected E standardCeiling(E e) { return (E) Iterators.getNext(tailSet(e, true).iterator(), null); } @Override // java.util.NavigableSet public E higher(E e) { return delegate().higher(e); } protected E standardHigher(E e) { return (E) Iterators.getNext(tailSet(e, false).iterator(), null); } @Override // java.util.NavigableSet public E pollFirst() { return delegate().pollFirst(); } protected E standardPollFirst() { return (E) Iterators.pollNext(iterator()); } @Override // java.util.NavigableSet public E pollLast() { return delegate().pollLast(); } protected E standardPollLast() { return (E) Iterators.pollNext(descendingIterator()); } protected E standardFirst() { return iterator().next(); } protected E standardLast() { return descendingIterator().next(); } @Override // java.util.NavigableSet public NavigableSet descendingSet() { return delegate().descendingSet(); } /* loaded from: classes2.dex */ protected class StandardDescendingSet extends Sets.DescendingSet { public StandardDescendingSet(ForwardingNavigableSet forwardingNavigableSet) { super(forwardingNavigableSet); } } @Override // java.util.NavigableSet public Iterator descendingIterator() { return delegate().descendingIterator(); } @Override // java.util.NavigableSet public NavigableSet subSet(E e, boolean z, E e2, boolean z2) { return delegate().subSet(e, z, e2, z2); } protected NavigableSet standardSubSet(E e, boolean z, E e2, boolean z2) { return tailSet(e, z).headSet(e2, z2); } /* JADX INFO: Access modifiers changed from: protected */ @Override // com.google.common.collect.ForwardingSortedSet public SortedSet standardSubSet(E e, E e2) { return subSet(e, true, e2, false); } @Override // java.util.NavigableSet public NavigableSet headSet(E e, boolean z) { return delegate().headSet(e, z); } /* JADX INFO: Access modifiers changed from: protected */ public SortedSet standardHeadSet(E e) { return headSet(e, false); } @Override // java.util.NavigableSet public NavigableSet tailSet(E e, boolean z) { return delegate().tailSet(e, z); } /* JADX INFO: Access modifiers changed from: protected */ public SortedSet standardTailSet(E e) { return tailSet(e, true); } }