package defpackage;

import java.util.Comparator;
import java.util.Iterator;
import java.util.SortedSet;

/* renamed from: ˊʿʟʩ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C1280 extends C4835 implements SortedSet {
    @Override // java.util.SortedSet
    public final Comparator comparator() {
        return ((SortedSet) this.f17960).comparator();
    }

    @Override // java.util.SortedSet
    public final Object first() {
        Iterator it = this.f17960.iterator();
        it.getClass();
        InterfaceC3076 interfaceC3076 = this.f17959;
        interfaceC3076.getClass();
        while (it.hasNext()) {
            Object next = it.next();
            if (interfaceC3076.apply(next)) {
                return next;
            }
        }
        C0190.m1427();
        return null;
    }

    @Override // java.util.SortedSet
    public final SortedSet headSet(Object obj) {
        return new C1280(((SortedSet) this.f17960).headSet(obj), this.f17959);
    }

    @Override // java.util.SortedSet
    public final Object last() {
        SortedSet sortedSetHeadSet = (SortedSet) this.f17960;
        while (true) {
            Object objLast = sortedSetHeadSet.last();
            if (this.f17959.apply(objLast)) {
                return objLast;
            }
            sortedSetHeadSet = sortedSetHeadSet.headSet(objLast);
        }
    }

    @Override // java.util.SortedSet
    public final SortedSet subSet(Object obj, Object obj2) {
        return new C1280(((SortedSet) this.f17960).subSet(obj, obj2), this.f17959);
    }

    @Override // java.util.SortedSet
    public final SortedSet tailSet(Object obj) {
        return new C1280(((SortedSet) this.f17960).tailSet(obj), this.f17959);
    }
}
