mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-14 18:07:16 +01:00
767 lines
34 KiB
Java
767 lines
34 KiB
Java
package androidx.collection;
|
|
|
|
import androidx.collection.internal.RuntimeHelpersKt;
|
|
import com.amazon.alexa.ra.core.ui.markdown.parser.formatter.MarkdownConstants;
|
|
import com.amazon.alexa.redesign.view.container.CardStudioAgentSpaceMetrics;
|
|
import com.amazon.appmanager.lib.DefaultPreloadManager;
|
|
import com.amazon.dee.app.services.metrics.AlexaMetricsConstants;
|
|
import com.dee.app.metrics.MetricsConstants;
|
|
import com.facebook.react.uimanager.ViewProps;
|
|
import io.ktor.util.PathKt$$ExternalSyntheticBUOutline0;
|
|
import kotlin.Metadata;
|
|
import kotlin.PublishedApi;
|
|
import kotlin.Unit;
|
|
import kotlin.jvm.JvmField;
|
|
import kotlin.jvm.JvmOverloads;
|
|
import kotlin.jvm.functions.Function1;
|
|
import kotlin.jvm.functions.Function2;
|
|
import kotlin.jvm.functions.Function3;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
import kotlin.jvm.internal.SourceDebugExtension;
|
|
import kotlin.ranges.IntRange;
|
|
import kotlin.ranges.RangesKt;
|
|
import okio.Buffer$$ExternalSyntheticBUOutline0;
|
|
import org.apache.commons.codec.language.bm.Languages;
|
|
import org.jetbrains.annotations.NotNull;
|
|
import org.jetbrains.annotations.Nullable;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@Metadata(d1 = {"\u0000d\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\b\n\u0002\b\u0005\n\u0002\u0010\u0016\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\b\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\t\n\u0002\u0018\u0002\n\u0002\b\u0014\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\u0002\n\u0002\b\f\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\r\n\u0002\b\n\n\u0002\u0018\u0002\n\u0000\b6\u0018\u00002\u00020\u0001B\u000f\b\u0004\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\t\u0010\u0014\u001a\u00020\u0015H\u0086\bJ:\u0010\u0014\u001a\u00020\u00152!\u0010\u0016\u001a\u001d\u0012\u0013\u0012\u00110\u0018¢\u0006\f\b\u0019\u0012\b\b\u001a\u0012\u0004\b\b(\u001b\u0012\u0004\u0012\u00020\u00150\u0017H\u0086\bø\u0001\u0000\u0082\u0002\b\n\u0006\b\u0001\u0012\u0002\u0010\u0001J$\u0010\u001c\u001a\u00020\u00032\u0006\u0010\u001b\u001a\u00020\u00032\b\b\u0002\u0010\u001d\u001a\u00020\u00032\b\b\u0002\u0010\u001e\u001a\u00020\u0003H\u0007J\u0011\u0010\u001f\u001a\u00020\u00152\u0006\u0010\u001b\u001a\u00020\u0018H\u0086\u0002J\u000e\u0010 \u001a\u00020\u00152\u0006\u0010!\u001a\u00020\u0000J\t\u0010\"\u001a\u00020\u0003H\u0086\bJ:\u0010\"\u001a\u00020\u00032!\u0010\u0016\u001a\u001d\u0012\u0013\u0012\u00110\u0018¢\u0006\f\b\u0019\u0012\b\b\u001a\u0012\u0004\b\b(\u001b\u0012\u0004\u0012\u00020\u00150\u0017H\u0086\bø\u0001\u0000\u0082\u0002\b\n\u0006\b\u0001\u0012\u0002\u0010\u0001J\u0010\u0010#\u001a\u00020\u00182\b\b\u0001\u0010$\u001a\u00020\u0003J9\u0010%\u001a\u00020\u00182\b\b\u0001\u0010$\u001a\u00020\u00032!\u0010&\u001a\u001d\u0012\u0013\u0012\u00110\u0003¢\u0006\f\b\u0019\u0012\b\b\u001a\u0012\u0004\b\b($\u0012\u0004\u0012\u00020\u00180\u0017H\u0086\bø\u0001\u0000J\u0013\u0010'\u001a\u00020\u00152\b\u0010(\u001a\u0004\u0018\u00010\u0001H\u0096\u0002J\u0006\u0010)\u001a\u00020\u0018J:\u0010)\u001a\u00020\u00182!\u0010\u0016\u001a\u001d\u0012\u0013\u0012\u00110\u0018¢\u0006\f\b\u0019\u0012\b\b\u001a\u0012\u0004\b\b(\u001b\u0012\u0004\u0012\u00020\u00150\u0017H\u0086\bø\u0001\u0000\u0082\u0002\b\n\u0006\b\u0001\u0012\u0002\u0010\u0001Jb\u0010*\u001a\u0002H+\"\u0004\b\u0000\u0010+2\u0006\u0010,\u001a\u0002H+26\u0010-\u001a2\u0012\u0013\u0012\u0011H+¢\u0006\f\b\u0019\u0012\b\b\u001a\u0012\u0004\b\b(/\u0012\u0013\u0012\u00110\u0018¢\u0006\f\b\u0019\u0012\b\b\u001a\u0012\u0004\b\b(\u001b\u0012\u0004\u0012\u0002H+0.H\u0086\bø\u0001\u0000\u0082\u0002\b\n\u0006\b\u0001\u0012\u0002\u0010\u0002¢\u0006\u0002\u00100Jw\u00101\u001a\u0002H+\"\u0004\b\u0000\u0010+2\u0006\u0010,\u001a\u0002H+2K\u0010-\u001aG\u0012\u0013\u0012\u00110\u0003¢\u0006\f\b\u0019\u0012\b\b\u001a\u0012\u0004\b\b($\u0012\u0013\u0012\u0011H+¢\u0006\f\b\u0019\u0012\b\b\u001a\u0012\u0004\b\b(/\u0012\u0013\u0012\u00110\u0018¢\u0006\f\b\u0019\u0012\b\b\u001a\u0012\u0004\b\b(\u001b\u0012\u0004\u0012\u0002H+02H\u0086\bø\u0001\u0000\u0082\u0002\b\n\u0006\b\u0001\u0012\u0002\u0010\u0002¢\u0006\u0002\u00103Jb\u00104\u001a\u0002H+\"\u0004\b\u0000\u0010+2\u0006\u0010,\u001a\u0002H+26\u0010-\u001a2\u0012\u0013\u0012\u00110\u0018¢\u0006\f\b\u0019\u0012\b\b\u001a\u0012\u0004\b\b(\u001b\u0012\u0013\u0012\u0011H+¢\u0006\f\b\u0019\u0012\b\b\u001a\u0012\u0004\b\b(/\u0012\u0004\u0012\u0002H+0.H\u0086\bø\u0001\u0000\u0082\u0002\b\n\u0006\b\u0001\u0012\u0002\u0010\u0002¢\u0006\u0002\u00100Jw\u00105\u001a\u0002H+\"\u0004\b\u0000\u0010+2\u0006\u0010,\u001a\u0002H+2K\u0010-\u001aG\u0012\u0013\u0012\u00110\u0003¢\u0006\f\b\u0019\u0012\b\b\u001a\u0012\u0004\b\b($\u0012\u0013\u0012\u00110\u0018¢\u0006\f\b\u0019\u0012\b\b\u001a\u0012\u0004\b\b(\u001b\u0012\u0013\u0012\u0011H+¢\u0006\f\b\u0019\u0012\b\b\u001a\u0012\u0004\b\b(/\u0012\u0004\u0012\u0002H+02H\u0086\bø\u0001\u0000\u0082\u0002\b\n\u0006\b\u0001\u0012\u0002\u0010\u0002¢\u0006\u0002\u00103J:\u00106\u001a\u0002072!\u00108\u001a\u001d\u0012\u0013\u0012\u00110\u0018¢\u0006\f\b\u0019\u0012\b\b\u001a\u0012\u0004\b\b(\u001b\u0012\u0004\u0012\u0002070\u0017H\u0086\bø\u0001\u0000\u0082\u0002\b\n\u0006\b\u0001\u0012\u0002\u0010\u0001JO\u00109\u001a\u00020726\u00108\u001a2\u0012\u0013\u0012\u00110\u0003¢\u0006\f\b\u0019\u0012\b\b\u001a\u0012\u0004\b\b($\u0012\u0013\u0012\u00110\u0018¢\u0006\f\b\u0019\u0012\b\b\u001a\u0012\u0004\b\b(\u001b\u0012\u0004\u0012\u0002070.H\u0086\bø\u0001\u0000\u0082\u0002\b\n\u0006\b\u0001\u0012\u0002\u0010\u0001J:\u0010:\u001a\u0002072!\u00108\u001a\u001d\u0012\u0013\u0012\u00110\u0018¢\u0006\f\b\u0019\u0012\b\b\u001a\u0012\u0004\b\b(\u001b\u0012\u0004\u0012\u0002070\u0017H\u0086\bø\u0001\u0000\u0082\u0002\b\n\u0006\b\u0001\u0012\u0002\u0010\u0001JO\u0010;\u001a\u00020726\u00108\u001a2\u0012\u0013\u0012\u00110\u0003¢\u0006\f\b\u0019\u0012\b\b\u001a\u0012\u0004\b\b($\u0012\u0013\u0012\u00110\u0018¢\u0006\f\b\u0019\u0012\b\b\u001a\u0012\u0004\b\b(\u001b\u0012\u0004\u0012\u0002070.H\u0086\bø\u0001\u0000\u0082\u0002\b\n\u0006\b\u0001\u0012\u0002\u0010\u0001J\u0013\u0010<\u001a\u00020\u00182\b\b\u0001\u0010$\u001a\u00020\u0003H\u0086\u0002J\b\u0010=\u001a\u00020\u0003H\u0016J\u000e\u0010>\u001a\u00020\u00032\u0006\u0010\u001b\u001a\u00020\u0018J:\u0010?\u001a\u00020\u00032!\u0010\u0016\u001a\u001d\u0012\u0013\u0012\u00110\u0018¢\u0006\f\b\u0019\u0012\b\b\u001a\u0012\u0004\b\b(\u001b\u0012\u0004\u0012\u00020\u00150\u0017H\u0086\bø\u0001\u0000\u0082\u0002\b\n\u0006\b\u0001\u0012\u0002\u0010\u0001J:\u0010@\u001a\u00020\u00032!\u0010\u0016\u001a\u001d\u0012\u0013\u0012\u00110\u0018¢\u0006\f\b\u0019\u0012\b\b\u001a\u0012\u0004\b\b(\u001b\u0012\u0004\u0012\u00020\u00150\u0017H\u0086\bø\u0001\u0000\u0082\u0002\b\n\u0006\b\u0001\u0012\u0002\u0010\u0001J\t\u0010A\u001a\u00020\u0015H\u0086\bJ\t\u0010B\u001a\u00020\u0015H\u0086\bJ:\u0010C\u001a\u00020D2\b\b\u0002\u0010E\u001a\u00020F2\b\b\u0002\u0010G\u001a\u00020F2\b\b\u0002\u0010H\u001a\u00020F2\b\b\u0002\u0010I\u001a\u00020\u00032\b\b\u0002\u0010J\u001a\u00020FH\u0007JT\u0010C\u001a\u00020D2\b\b\u0002\u0010E\u001a\u00020F2\b\b\u0002\u0010G\u001a\u00020F2\b\b\u0002\u0010H\u001a\u00020F2\b\b\u0002\u0010I\u001a\u00020\u00032\b\b\u0002\u0010J\u001a\u00020F2\u0014\b\u0004\u0010K\u001a\u000e\u0012\u0004\u0012\u00020\u0018\u0012\u0004\u0012\u00020F0\u0017H\u0087\bø\u0001\u0000J\u0006\u0010L\u001a\u00020\u0018J:\u0010L\u001a\u00020\u00182!\u0010\u0016\u001a\u001d\u0012\u0013\u0012\u00110\u0018¢\u0006\f\b\u0019\u0012\b\b\u001a\u0012\u0004\b\b(\u001b\u0012\u0004\u0012\u00020\u00150\u0017H\u0086\bø\u0001\u0000\u0082\u0002\b\n\u0006\b\u0001\u0012\u0002\u0010\u0001J\u000e\u0010M\u001a\u00020\u00032\u0006\u0010\u001b\u001a\u00020\u0018J\t\u0010N\u001a\u00020\u0015H\u0086\bJ:\u0010O\u001a\u00020\u00152!\u0010\u0016\u001a\u001d\u0012\u0013\u0012\u00110\u0018¢\u0006\f\b\u0019\u0012\b\b\u001a\u0012\u0004\b\b(\u001b\u0012\u0004\u0012\u00020\u00150\u0017H\u0086\bø\u0001\u0000\u0082\u0002\b\n\u0006\b\u0001\u0012\u0002\u0010\u0001J\b\u0010P\u001a\u00020DH\u0016R\u0018\u0010\u0005\u001a\u00020\u00038\u0000@\u0000X\u0081\u000e¢\u0006\b\n\u0000\u0012\u0004\b\u0006\u0010\u0007R\u0018\u0010\b\u001a\u00020\t8\u0000@\u0000X\u0081\u000e¢\u0006\b\n\u0000\u0012\u0004\b\n\u0010\u0007R\u0012\u0010\u000b\u001a\u00020\f8Æ\u0002¢\u0006\u0006\u001a\u0004\b\r\u0010\u000eR\u0012\u0010\u000f\u001a\u00020\u00038Ç\u0002¢\u0006\u0006\u001a\u0004\b\u0010\u0010\u0011R\u0012\u0010\u0012\u001a\u00020\u00038Ç\u0002¢\u0006\u0006\u001a\u0004\b\u0013\u0010\u0011\u0082\u0001\u0001Q\u0082\u0002\u0007\n\u0005\b\u009920\u0001¨\u0006R"}, d2 = {"Landroidx/collection/LongList;", "", "initialCapacity", "", "(I)V", "_size", "get_size$annotations", "()V", "content", "", "getContent$annotations", "indices", "Lkotlin/ranges/IntRange;", "getIndices", "()Lkotlin/ranges/IntRange;", "lastIndex", "getLastIndex", "()I", "size", "getSize", Languages.ANY, "", "predicate", "Lkotlin/Function1;", "", "Lkotlin/ParameterName;", "name", "element", "binarySearch", "fromIndex", "toIndex", "contains", "containsAll", AlexaMetricsConstants.MetricsComponents.ELEMENTS, "count", "elementAt", "index", "elementAtOrElse", "defaultValue", "equals", CardStudioAgentSpaceMetrics.DimensionValue.SCHEME_OTHER, DefaultPreloadManager.METRIC_PATH_FIRST, "fold", "R", "initial", "operation", "Lkotlin/Function2;", "acc", "(Ljava/lang/Object;Lkotlin/jvm/functions/Function2;)Ljava/lang/Object;", "foldIndexed", "Lkotlin/Function3;", "(Ljava/lang/Object;Lkotlin/jvm/functions/Function3;)Ljava/lang/Object;", "foldRight", "foldRightIndexed", "forEach", "", "block", "forEachIndexed", "forEachReversed", "forEachReversedIndexed", MetricsConstants.Method.CACHE_GET, "hashCode", "indexOf", "indexOfFirst", "indexOfLast", "isEmpty", "isNotEmpty", "joinToString", "", "separator", "", "prefix", "postfix", "limit", "truncated", ViewProps.TRANSFORM, "last", "lastIndexOf", "none", "reversedAny", "toString", "Landroidx/collection/MutableLongList;", "collection"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
|
@SourceDebugExtension({"SMAP\nLongList.kt\nKotlin\n*S Kotlin\n*F\n+ 1 LongList.kt\nandroidx/collection/LongList\n*L\n1#1,972:1\n364#1:973\n367#1:974\n237#1,6:975\n265#1,6:981\n237#1,6:987\n74#1:993\n237#1,6:994\n364#1:1000\n237#1,6:1001\n237#1,6:1007\n251#1,6:1013\n265#1,6:1019\n279#1,6:1025\n251#1,6:1031\n251#1,6:1037\n279#1,6:1043\n364#1:1049\n70#1:1050\n265#1,6:1051\n279#1,6:1057\n65#1:1063\n251#1,6:1064\n251#1,6:1070\n237#1,6:1076\n74#1:1082\n485#1,10:1083\n251#1,4:1093\n495#1,9:1097\n256#1:1106\n504#1,2:1107\n485#1,10:1109\n251#1,4:1119\n495#1,9:1123\n256#1:1132\n504#1,2:1133\n485#1,10:1135\n251#1,4:1145\n495#1,9:1149\n256#1:1158\n504#1,2:1159\n485#1,10:1161\n251#1,4:1171\n495#1,9:1175\n256#1:1184\n504#1,2:1185\n485#1,10:1187\n251#1,4:1197\n495#1,9:1201\n256#1:1210\n504#1,2:1211\n*S KotlinDebug\n*F\n+ 1 LongList.kt\nandroidx/collection/LongList\n*L\n78#1:973\n83#1:974\n89#1:975,6\n103#1:981,6\n113#1:987,6\n126#1:993\n143#1:994,6\n152#1:1000\n166#1:1001,6\n182#1:1007,6\n196#1:1013,6\n212#1:1019,6\n226#1:1025,6\n328#1:1031,6\n342#1:1037,6\n355#1:1043,6\n374#1:1049\n377#1:1050\n388#1:1051,6\n401#1:1057,6\n423#1:1063\n463#1:1064,6\n494#1:1070,6\n510#1:1076,6\n523#1:1082\n-1#1:1083,10\n-1#1:1093,4\n-1#1:1097,9\n-1#1:1106\n-1#1:1107,2\n-1#1:1109,10\n-1#1:1119,4\n-1#1:1123,9\n-1#1:1132\n-1#1:1133,2\n-1#1:1135,10\n-1#1:1145,4\n-1#1:1149,9\n-1#1:1158\n-1#1:1159,2\n-1#1:1161,10\n-1#1:1171,4\n-1#1:1175,9\n-1#1:1184\n-1#1:1185,2\n-1#1:1187,10\n-1#1:1197,4\n-1#1:1201,9\n-1#1:1210\n-1#1:1211,2\n*E\n"})
|
|
/* loaded from: classes.dex */
|
|
public abstract class LongList {
|
|
|
|
@JvmField
|
|
public int _size;
|
|
|
|
@JvmField
|
|
@NotNull
|
|
public long[] content;
|
|
|
|
private LongList(int i) {
|
|
this.content = i == 0 ? LongSetKt.getEmptyLongArray() : new long[i];
|
|
}
|
|
|
|
public static /* synthetic */ int binarySearch$default(LongList longList, int i, int i2, int i3, int i4, Object obj) {
|
|
if (obj != null) {
|
|
Buffer$$ExternalSyntheticBUOutline0.m$1("Super calls with default arguments not supported in this target, function: binarySearch");
|
|
return 0;
|
|
}
|
|
if ((i4 & 2) != 0) {
|
|
i2 = 0;
|
|
}
|
|
if ((i4 & 4) != 0) {
|
|
i3 = longList._size;
|
|
}
|
|
return longList.binarySearch(i, i2, i3);
|
|
}
|
|
|
|
public static /* synthetic */ String joinToString$default(LongList longList, CharSequence charSequence, CharSequence charSequence2, CharSequence charSequence3, int i, CharSequence charSequence4, Function1 function1, int i2, Object obj) {
|
|
if (obj != null) {
|
|
Buffer$$ExternalSyntheticBUOutline0.m$1("Super calls with default arguments not supported in this target, function: joinToString");
|
|
return null;
|
|
}
|
|
if ((i2 & 1) != 0) {
|
|
charSequence = ", ";
|
|
}
|
|
if ((i2 & 2) != 0) {
|
|
charSequence2 = "";
|
|
}
|
|
if ((i2 & 4) != 0) {
|
|
charSequence3 = "";
|
|
}
|
|
if ((i2 & 8) != 0) {
|
|
i = -1;
|
|
}
|
|
if ((i2 & 16) != 0) {
|
|
charSequence4 = "...";
|
|
}
|
|
charSequence.getClass();
|
|
charSequence2.getClass();
|
|
charSequence3.getClass();
|
|
charSequence4.getClass();
|
|
function1.getClass();
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append(charSequence2);
|
|
long[] jArr = longList.content;
|
|
int i3 = longList._size;
|
|
int i4 = 0;
|
|
while (true) {
|
|
if (i4 >= i3) {
|
|
sb.append(charSequence3);
|
|
break;
|
|
}
|
|
long j = jArr[i4];
|
|
if (i4 == i) {
|
|
sb.append(charSequence4);
|
|
break;
|
|
}
|
|
if (i4 != 0) {
|
|
sb.append(charSequence);
|
|
}
|
|
sb.append((CharSequence) function1.invoke(Long.valueOf(j)));
|
|
i4++;
|
|
}
|
|
return sb.toString();
|
|
}
|
|
|
|
public final boolean any(@NotNull Function1<? super Long, Boolean> predicate) {
|
|
predicate.getClass();
|
|
long[] jArr = this.content;
|
|
int i = this._size;
|
|
for (int i2 = 0; i2 < i; i2++) {
|
|
if (predicate.invoke(Long.valueOf(jArr[i2])).booleanValue()) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
@JvmOverloads
|
|
public final int binarySearch(int element, int fromIndex, int toIndex) {
|
|
if (fromIndex < 0 || fromIndex >= toIndex || toIndex > this._size) {
|
|
RuntimeHelpersKt.throwIndexOutOfBoundsException("");
|
|
}
|
|
int i = toIndex - 1;
|
|
while (fromIndex <= i) {
|
|
int i2 = (fromIndex + i) >>> 1;
|
|
long j = this.content[i2];
|
|
long j2 = element;
|
|
if (j < j2) {
|
|
fromIndex = i2 + 1;
|
|
} else {
|
|
if (j <= j2) {
|
|
return i2;
|
|
}
|
|
i = i2 - 1;
|
|
}
|
|
}
|
|
return -(fromIndex + 1);
|
|
}
|
|
|
|
public final boolean contains(long element) {
|
|
long[] jArr = this.content;
|
|
int i = this._size;
|
|
for (int i2 = 0; i2 < i; i2++) {
|
|
if (jArr[i2] == element) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
public final boolean containsAll(@NotNull LongList elements) {
|
|
elements.getClass();
|
|
IntRange until = RangesKt.until(0, elements._size);
|
|
int first = until.getFirst();
|
|
int last = until.getLast();
|
|
if (first > last) {
|
|
return true;
|
|
}
|
|
while (contains(elements.get(first))) {
|
|
if (first == last) {
|
|
return true;
|
|
}
|
|
first++;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
public final int count(@NotNull Function1<? super Long, Boolean> predicate) {
|
|
predicate.getClass();
|
|
long[] jArr = this.content;
|
|
int i = this._size;
|
|
int i2 = 0;
|
|
for (int i3 = 0; i3 < i; i3++) {
|
|
if (predicate.invoke(Long.valueOf(jArr[i3])).booleanValue()) {
|
|
i2++;
|
|
}
|
|
}
|
|
return i2;
|
|
}
|
|
|
|
public final long elementAt(@androidx.annotation.IntRange(from = 0) int index) {
|
|
if (index < 0 || index >= this._size) {
|
|
RuntimeHelpersKt.throwIndexOutOfBoundsException("Index must be between 0 and size");
|
|
}
|
|
return this.content[index];
|
|
}
|
|
|
|
public final long elementAtOrElse(@androidx.annotation.IntRange(from = 0) int index, @NotNull Function1<? super Integer, Long> defaultValue) {
|
|
defaultValue.getClass();
|
|
return (index < 0 || index >= this._size) ? defaultValue.invoke(Integer.valueOf(index)).longValue() : this.content[index];
|
|
}
|
|
|
|
public boolean equals(@Nullable Object other) {
|
|
if (other instanceof LongList) {
|
|
LongList longList = (LongList) other;
|
|
int i = longList._size;
|
|
int i2 = this._size;
|
|
if (i == i2) {
|
|
long[] jArr = this.content;
|
|
long[] jArr2 = longList.content;
|
|
IntRange until = RangesKt.until(0, i2);
|
|
int first = until.getFirst();
|
|
int last = until.getLast();
|
|
if (first > last) {
|
|
return true;
|
|
}
|
|
while (jArr[first] == jArr2[first]) {
|
|
if (first == last) {
|
|
return true;
|
|
}
|
|
first++;
|
|
}
|
|
return false;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
public final long first(@NotNull Function1<? super Long, Boolean> predicate) {
|
|
predicate.getClass();
|
|
long[] jArr = this.content;
|
|
int i = this._size;
|
|
for (int i2 = 0; i2 < i; i2++) {
|
|
long j = jArr[i2];
|
|
if (predicate.invoke(Long.valueOf(j)).booleanValue()) {
|
|
return j;
|
|
}
|
|
}
|
|
PathKt$$ExternalSyntheticBUOutline0.m("LongList contains no element matching the predicate.");
|
|
return 0L;
|
|
}
|
|
|
|
public final <R> R fold(R initial, @NotNull Function2<? super R, ? super Long, ? extends R> operation) {
|
|
operation.getClass();
|
|
long[] jArr = this.content;
|
|
int i = this._size;
|
|
for (int i2 = 0; i2 < i; i2++) {
|
|
initial = operation.invoke(initial, Long.valueOf(jArr[i2]));
|
|
}
|
|
return initial;
|
|
}
|
|
|
|
public final <R> R foldIndexed(R initial, @NotNull Function3<? super Integer, ? super R, ? super Long, ? extends R> operation) {
|
|
operation.getClass();
|
|
long[] jArr = this.content;
|
|
int i = this._size;
|
|
for (int i2 = 0; i2 < i; i2++) {
|
|
R r = initial;
|
|
initial = operation.invoke(Integer.valueOf(i2), r, Long.valueOf(jArr[i2]));
|
|
}
|
|
return initial;
|
|
}
|
|
|
|
public final <R> R foldRight(R initial, @NotNull Function2<? super Long, ? super R, ? extends R> operation) {
|
|
operation.getClass();
|
|
long[] jArr = this.content;
|
|
int i = this._size;
|
|
while (true) {
|
|
i--;
|
|
if (-1 >= i) {
|
|
return initial;
|
|
}
|
|
initial = operation.invoke(Long.valueOf(jArr[i]), initial);
|
|
}
|
|
}
|
|
|
|
public final <R> R foldRightIndexed(R initial, @NotNull Function3<? super Integer, ? super Long, ? super R, ? extends R> operation) {
|
|
operation.getClass();
|
|
long[] jArr = this.content;
|
|
int i = this._size;
|
|
while (true) {
|
|
i--;
|
|
if (-1 >= i) {
|
|
return initial;
|
|
}
|
|
initial = operation.invoke(Integer.valueOf(i), Long.valueOf(jArr[i]), initial);
|
|
}
|
|
}
|
|
|
|
public final void forEach(@NotNull Function1<? super Long, Unit> block) {
|
|
block.getClass();
|
|
long[] jArr = this.content;
|
|
int i = this._size;
|
|
for (int i2 = 0; i2 < i; i2++) {
|
|
block.invoke(Long.valueOf(jArr[i2]));
|
|
}
|
|
}
|
|
|
|
public final void forEachIndexed(@NotNull Function2<? super Integer, ? super Long, Unit> block) {
|
|
block.getClass();
|
|
long[] jArr = this.content;
|
|
int i = this._size;
|
|
for (int i2 = 0; i2 < i; i2++) {
|
|
block.invoke(Integer.valueOf(i2), Long.valueOf(jArr[i2]));
|
|
}
|
|
}
|
|
|
|
public final void forEachReversed(@NotNull Function1<? super Long, Unit> block) {
|
|
block.getClass();
|
|
long[] jArr = this.content;
|
|
int i = this._size;
|
|
while (true) {
|
|
i--;
|
|
if (-1 >= i) {
|
|
return;
|
|
} else {
|
|
block.invoke(Long.valueOf(jArr[i]));
|
|
}
|
|
}
|
|
}
|
|
|
|
public final void forEachReversedIndexed(@NotNull Function2<? super Integer, ? super Long, Unit> block) {
|
|
block.getClass();
|
|
long[] jArr = this.content;
|
|
int i = this._size;
|
|
while (true) {
|
|
i--;
|
|
if (-1 >= i) {
|
|
return;
|
|
} else {
|
|
block.invoke(Integer.valueOf(i), Long.valueOf(jArr[i]));
|
|
}
|
|
}
|
|
}
|
|
|
|
public final long get(@androidx.annotation.IntRange(from = 0) int index) {
|
|
if (index < 0 || index >= this._size) {
|
|
RuntimeHelpersKt.throwIndexOutOfBoundsException("Index must be between 0 and size");
|
|
}
|
|
return this.content[index];
|
|
}
|
|
|
|
@NotNull
|
|
public final IntRange getIndices() {
|
|
return RangesKt.until(0, this._size);
|
|
}
|
|
|
|
@androidx.annotation.IntRange(from = -1)
|
|
public final int getLastIndex() {
|
|
return this._size - 1;
|
|
}
|
|
|
|
@androidx.annotation.IntRange(from = 0)
|
|
public final int getSize() {
|
|
return this._size;
|
|
}
|
|
|
|
public int hashCode() {
|
|
long[] jArr = this.content;
|
|
int i = this._size;
|
|
int i2 = 0;
|
|
for (int i3 = 0; i3 < i; i3++) {
|
|
i2 += Long.hashCode(jArr[i3]) * 31;
|
|
}
|
|
return i2;
|
|
}
|
|
|
|
public final int indexOf(long element) {
|
|
long[] jArr = this.content;
|
|
int i = this._size;
|
|
for (int i2 = 0; i2 < i; i2++) {
|
|
if (element == jArr[i2]) {
|
|
return i2;
|
|
}
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
public final int indexOfFirst(@NotNull Function1<? super Long, Boolean> predicate) {
|
|
predicate.getClass();
|
|
long[] jArr = this.content;
|
|
int i = this._size;
|
|
for (int i2 = 0; i2 < i; i2++) {
|
|
if (predicate.invoke(Long.valueOf(jArr[i2])).booleanValue()) {
|
|
return i2;
|
|
}
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
public final int indexOfLast(@NotNull Function1<? super Long, Boolean> predicate) {
|
|
predicate.getClass();
|
|
long[] jArr = this.content;
|
|
int i = this._size;
|
|
do {
|
|
i--;
|
|
if (-1 >= i) {
|
|
return -1;
|
|
}
|
|
} while (!predicate.invoke(Long.valueOf(jArr[i])).booleanValue());
|
|
return i;
|
|
}
|
|
|
|
public final boolean isEmpty() {
|
|
return this._size == 0;
|
|
}
|
|
|
|
public final boolean isNotEmpty() {
|
|
return this._size != 0;
|
|
}
|
|
|
|
@JvmOverloads
|
|
@NotNull
|
|
public final String joinToString(@NotNull CharSequence separator, @NotNull CharSequence prefix, @NotNull CharSequence postfix, int limit, @NotNull CharSequence truncated, @NotNull Function1<? super Long, ? extends CharSequence> transform) {
|
|
separator.getClass();
|
|
prefix.getClass();
|
|
postfix.getClass();
|
|
truncated.getClass();
|
|
transform.getClass();
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append(prefix);
|
|
long[] jArr = this.content;
|
|
int i = this._size;
|
|
int i2 = 0;
|
|
while (true) {
|
|
if (i2 >= i) {
|
|
sb.append(postfix);
|
|
break;
|
|
}
|
|
long j = jArr[i2];
|
|
if (i2 == limit) {
|
|
sb.append(truncated);
|
|
break;
|
|
}
|
|
if (i2 != 0) {
|
|
sb.append(separator);
|
|
}
|
|
sb.append(transform.invoke(Long.valueOf(j)));
|
|
i2++;
|
|
}
|
|
return sb.toString();
|
|
}
|
|
|
|
public final long last(@NotNull Function1<? super Long, Boolean> predicate) {
|
|
long j;
|
|
predicate.getClass();
|
|
long[] jArr = this.content;
|
|
int i = this._size;
|
|
do {
|
|
i--;
|
|
if (-1 >= i) {
|
|
PathKt$$ExternalSyntheticBUOutline0.m("LongList contains no element matching the predicate.");
|
|
return 0L;
|
|
}
|
|
j = jArr[i];
|
|
} while (!predicate.invoke(Long.valueOf(j)).booleanValue());
|
|
return j;
|
|
}
|
|
|
|
public final int lastIndexOf(long element) {
|
|
long[] jArr = this.content;
|
|
int i = this._size;
|
|
do {
|
|
i--;
|
|
if (-1 >= i) {
|
|
return -1;
|
|
}
|
|
} while (jArr[i] != element);
|
|
return i;
|
|
}
|
|
|
|
public final boolean none() {
|
|
return this._size == 0;
|
|
}
|
|
|
|
public final boolean reversedAny(@NotNull Function1<? super Long, Boolean> predicate) {
|
|
predicate.getClass();
|
|
long[] jArr = this.content;
|
|
for (int i = this._size - 1; -1 < i; i--) {
|
|
if (predicate.invoke(Long.valueOf(jArr[i])).booleanValue()) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
@NotNull
|
|
public String toString() {
|
|
return joinToString$default(this, null, MarkdownConstants.LEFT_BRACKET, MarkdownConstants.RIGHT_BRACKET, 0, null, 25, null);
|
|
}
|
|
|
|
public /* synthetic */ LongList(int i, DefaultConstructorMarker defaultConstructorMarker) {
|
|
this(i);
|
|
}
|
|
|
|
@PublishedApi
|
|
public static /* synthetic */ void getContent$annotations() {
|
|
}
|
|
|
|
@PublishedApi
|
|
public static /* synthetic */ void get_size$annotations() {
|
|
}
|
|
|
|
public final boolean any() {
|
|
return this._size != 0;
|
|
}
|
|
|
|
/* renamed from: count, reason: from getter */
|
|
public final int get_size() {
|
|
return this._size;
|
|
}
|
|
|
|
public final long first() {
|
|
if (this._size == 0) {
|
|
RuntimeHelpersKt.throwNoSuchElementException("LongList is empty.");
|
|
}
|
|
return this.content[0];
|
|
}
|
|
|
|
public final long last() {
|
|
if (this._size == 0) {
|
|
RuntimeHelpersKt.throwNoSuchElementException("LongList is empty.");
|
|
}
|
|
return this.content[this._size - 1];
|
|
}
|
|
|
|
@JvmOverloads
|
|
public final int binarySearch(int i, int i2) {
|
|
return binarySearch$default(this, i, i2, 0, 4, null);
|
|
}
|
|
|
|
@JvmOverloads
|
|
public final int binarySearch(int i) {
|
|
return binarySearch$default(this, i, 0, 0, 6, null);
|
|
}
|
|
|
|
@JvmOverloads
|
|
@NotNull
|
|
public final String joinToString(@NotNull CharSequence charSequence) {
|
|
charSequence.getClass();
|
|
return joinToString$default(this, charSequence, null, null, 0, null, 30, null);
|
|
}
|
|
|
|
@JvmOverloads
|
|
@NotNull
|
|
public final String joinToString(@NotNull CharSequence charSequence, @NotNull CharSequence charSequence2) {
|
|
charSequence.getClass();
|
|
charSequence2.getClass();
|
|
return joinToString$default(this, charSequence, charSequence2, null, 0, null, 28, null);
|
|
}
|
|
|
|
@JvmOverloads
|
|
@NotNull
|
|
public final String joinToString(@NotNull CharSequence charSequence, @NotNull CharSequence charSequence2, @NotNull CharSequence charSequence3) {
|
|
DoubleList$$ExternalSyntheticOutline0.m(charSequence, charSequence2, charSequence3);
|
|
return joinToString$default(this, charSequence, charSequence2, charSequence3, 0, null, 24, null);
|
|
}
|
|
|
|
@JvmOverloads
|
|
@NotNull
|
|
public final String joinToString(@NotNull CharSequence charSequence, @NotNull CharSequence charSequence2, @NotNull CharSequence charSequence3, int i) {
|
|
DoubleList$$ExternalSyntheticOutline0.m(charSequence, charSequence2, charSequence3);
|
|
return joinToString$default(this, charSequence, charSequence2, charSequence3, i, null, 16, null);
|
|
}
|
|
|
|
@JvmOverloads
|
|
@NotNull
|
|
public final String joinToString(@NotNull CharSequence separator, @NotNull CharSequence prefix, @NotNull CharSequence postfix, int limit, @NotNull CharSequence truncated) {
|
|
StringBuilder m = DoubleList$$ExternalSyntheticOutline0.m(separator, prefix, postfix, truncated, prefix);
|
|
long[] jArr = this.content;
|
|
int i = this._size;
|
|
int i2 = 0;
|
|
while (true) {
|
|
if (i2 < i) {
|
|
long j = jArr[i2];
|
|
if (i2 == limit) {
|
|
m.append(truncated);
|
|
break;
|
|
}
|
|
if (i2 != 0) {
|
|
m.append(separator);
|
|
}
|
|
m.append(j);
|
|
i2++;
|
|
} else {
|
|
m.append(postfix);
|
|
break;
|
|
}
|
|
}
|
|
return m.toString();
|
|
}
|
|
|
|
@JvmOverloads
|
|
@NotNull
|
|
public final String joinToString() {
|
|
return joinToString$default(this, null, null, null, 0, null, 31, null);
|
|
}
|
|
|
|
@JvmOverloads
|
|
@NotNull
|
|
public final String joinToString(@NotNull CharSequence charSequence, @NotNull CharSequence charSequence2, @NotNull CharSequence charSequence3, int i, @NotNull Function1<? super Long, ? extends CharSequence> function1) {
|
|
charSequence.getClass();
|
|
charSequence2.getClass();
|
|
charSequence3.getClass();
|
|
function1.getClass();
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append(charSequence2);
|
|
long[] jArr = this.content;
|
|
int i2 = this._size;
|
|
int i3 = 0;
|
|
while (true) {
|
|
if (i3 < i2) {
|
|
long j = jArr[i3];
|
|
if (i3 == i) {
|
|
sb.append((CharSequence) "...");
|
|
break;
|
|
}
|
|
if (i3 != 0) {
|
|
sb.append(charSequence);
|
|
}
|
|
sb.append(function1.invoke(Long.valueOf(j)));
|
|
i3++;
|
|
} else {
|
|
sb.append(charSequence3);
|
|
break;
|
|
}
|
|
}
|
|
return sb.toString();
|
|
}
|
|
|
|
@JvmOverloads
|
|
@NotNull
|
|
public final String joinToString(@NotNull CharSequence charSequence, @NotNull CharSequence charSequence2, @NotNull CharSequence charSequence3, @NotNull Function1<? super Long, ? extends CharSequence> function1) {
|
|
charSequence.getClass();
|
|
charSequence2.getClass();
|
|
charSequence3.getClass();
|
|
function1.getClass();
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append(charSequence2);
|
|
long[] jArr = this.content;
|
|
int i = this._size;
|
|
int i2 = 0;
|
|
while (true) {
|
|
if (i2 < i) {
|
|
long j = jArr[i2];
|
|
if (i2 == -1) {
|
|
sb.append((CharSequence) "...");
|
|
break;
|
|
}
|
|
if (i2 != 0) {
|
|
sb.append(charSequence);
|
|
}
|
|
sb.append(function1.invoke(Long.valueOf(j)));
|
|
i2++;
|
|
} else {
|
|
sb.append(charSequence3);
|
|
break;
|
|
}
|
|
}
|
|
return sb.toString();
|
|
}
|
|
|
|
@JvmOverloads
|
|
@NotNull
|
|
public final String joinToString(@NotNull CharSequence charSequence, @NotNull CharSequence charSequence2, @NotNull Function1<? super Long, ? extends CharSequence> function1) {
|
|
charSequence.getClass();
|
|
charSequence2.getClass();
|
|
function1.getClass();
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append(charSequence2);
|
|
long[] jArr = this.content;
|
|
int i = this._size;
|
|
int i2 = 0;
|
|
while (true) {
|
|
if (i2 < i) {
|
|
long j = jArr[i2];
|
|
if (i2 == -1) {
|
|
sb.append((CharSequence) "...");
|
|
break;
|
|
}
|
|
if (i2 != 0) {
|
|
sb.append(charSequence);
|
|
}
|
|
sb.append(function1.invoke(Long.valueOf(j)));
|
|
i2++;
|
|
} else {
|
|
sb.append((CharSequence) "");
|
|
break;
|
|
}
|
|
}
|
|
return sb.toString();
|
|
}
|
|
|
|
public static /* synthetic */ String joinToString$default(LongList longList, CharSequence charSequence, CharSequence charSequence2, CharSequence charSequence3, int i, CharSequence charSequence4, int i2, Object obj) {
|
|
if (obj != null) {
|
|
Buffer$$ExternalSyntheticBUOutline0.m$1("Super calls with default arguments not supported in this target, function: joinToString");
|
|
return null;
|
|
}
|
|
if ((i2 & 1) != 0) {
|
|
charSequence = ", ";
|
|
}
|
|
if ((i2 & 2) != 0) {
|
|
charSequence2 = "";
|
|
}
|
|
if ((i2 & 4) != 0) {
|
|
charSequence3 = "";
|
|
}
|
|
if ((i2 & 8) != 0) {
|
|
i = -1;
|
|
}
|
|
if ((i2 & 16) != 0) {
|
|
charSequence4 = "...";
|
|
}
|
|
CharSequence charSequence5 = charSequence4;
|
|
CharSequence charSequence6 = charSequence3;
|
|
return longList.joinToString(charSequence, charSequence2, charSequence6, i, charSequence5);
|
|
}
|
|
|
|
@JvmOverloads
|
|
@NotNull
|
|
public final String joinToString(@NotNull CharSequence charSequence, @NotNull Function1<? super Long, ? extends CharSequence> function1) {
|
|
charSequence.getClass();
|
|
function1.getClass();
|
|
StringBuilder sb = new StringBuilder("");
|
|
long[] jArr = this.content;
|
|
int i = this._size;
|
|
int i2 = 0;
|
|
while (true) {
|
|
if (i2 < i) {
|
|
long j = jArr[i2];
|
|
if (i2 == -1) {
|
|
sb.append((CharSequence) "...");
|
|
break;
|
|
}
|
|
if (i2 != 0) {
|
|
sb.append(charSequence);
|
|
}
|
|
sb.append(function1.invoke(Long.valueOf(j)));
|
|
i2++;
|
|
} else {
|
|
sb.append((CharSequence) "");
|
|
break;
|
|
}
|
|
}
|
|
return sb.toString();
|
|
}
|
|
|
|
@JvmOverloads
|
|
@NotNull
|
|
public final String joinToString(@NotNull Function1<? super Long, ? extends CharSequence> function1) {
|
|
function1.getClass();
|
|
StringBuilder sb = new StringBuilder("");
|
|
long[] jArr = this.content;
|
|
int i = this._size;
|
|
int i2 = 0;
|
|
while (true) {
|
|
if (i2 < i) {
|
|
long j = jArr[i2];
|
|
if (i2 == -1) {
|
|
sb.append((CharSequence) "...");
|
|
break;
|
|
}
|
|
if (i2 != 0) {
|
|
sb.append((CharSequence) ", ");
|
|
}
|
|
sb.append(function1.invoke(Long.valueOf(j)));
|
|
i2++;
|
|
} else {
|
|
sb.append((CharSequence) "");
|
|
break;
|
|
}
|
|
}
|
|
return sb.toString();
|
|
}
|
|
}
|