content: package androidx.core.util;
  
  import android.util.LongSparseArray;
  import java.util.Iterator;
  import kotlin.Metadata;
  import kotlin.Unit;
  import kotlin.collections.LongIterator;
  import kotlin.jvm.functions.Function0;
  import kotlin.jvm.functions.Function2;
  import kotlin.jvm.internal.Intrinsics;
  
  @Metadata(d1 = {"\u0000F\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\t\n\u0002\b\u0005\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\b\n\u0002\u0010(\n\u0000\u001a!\u0010\u0006\u001a\u00020\u0007\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u00032\u0006\u0010\b\u001a\u00020\tH\n\u001a!\u0010\n\u001a\u00020\u0007\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u00032\u0006\u0010\b\u001a\u00020\tH\b\u001a&\u0010\u000b\u001a\u00020\u0007\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u00032\u0006\u0010\f\u001a\u0002H\u0002H\b¢\u0006\u0002\u0010\r\u001aT\u0010\u000e\u001a\u00020\u000f\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u000326\u0010\u0010\u001a2\u0012\u0013\u0012\u00110\t¢\u0006\f\b\u0012\u0012\b\b\u0013\u0012\u0004\b\b(\b\u0012\u0013\u0012\u0011H\u0002¢\u0006\f\b\u0012\u0012\b\b\u0013\u0012\u0004\b\b(\f\u0012\u0004\u0012\u00020\u000f0\u0011H\bø\u0001\u0000\u001a.\u0010\u0014\u001a\u0002H\u0002\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u00032\u0006\u0010\b\u001a\u00020\t2\u0006\u0010\u0015\u001a\u0002H\u0002H\b¢\u0006\u0002\u0010\u0016\u001a7\u0010\u0017\u001a\u0002H\u0002\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u00032\u0006\u0010\b\u001a\u00020\t2\f\u0010\u0015\u001a\b\u0012\u0004\u0012\u0002H\u00020\u0018H\bø\u0001\u0000¢\u0006\u0002\u0010\u0019\u001a\u0019\u0010\u001a\u001a\u00020\u0007\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u0003H\b\u001a\u0019\u0010\u001b\u001a\u00020\u0007\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u0003H\b\u001a\u0018\u0010\u001c\u001a\u00020\u001d\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u0003H\u0007\u001a-\u0010\u001e\u001a\b\u0012\u0004\u0012\u0002H\u00020\u0003\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u00032\f\u0010\u001f\u001a\b\u0012\u0004\u0012\u0002H\u00020\u0003H\u0002\u001a&\u0010 \u001a\u00020\u000f\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u00032\f\u0010\u001f\u001a\b\u0012\u0004\u0012\u0002H\u00020\u0003H\u0007\u001a-\u0010!\u001a\u00020\u0007\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u00032\u0006\u0010\b\u001a\u00020\t2\u0006\u0010\f\u001a\u0002H\u0002H\u0007¢\u0006\u0002\u0010\"\u001a.\u0010#\u001a\u00020\u000f\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u00032\u0006\u0010\b\u001a\u00020\t2\u0006\u0010\f\u001a\u0002H\u0002H\n¢\u0006\u0002\u0010$\u001a\u001e\u0010%\u001a\b\u0012\u0004\u0012\u0002H\u00020&\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u0003H\u0007\"\"\u0010\u0000\u001a\u00020\u0001\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u00038Ç\u0002¢\u0006\u0006\u001a\u0004\b\u0004\u0010\u0005\u0002\u0007\n\u0005\b20\u0001¨\u0006'"}, d2 = {"size", "", "T", "Landroid/util/LongSparseArray;", "getSize", "(Landroid/util/LongSparseArray;)I", "contains", "", "key", "", "containsKey", "containsValue", "value", "(Landroid/util/LongSparseArray;Ljava/lang/Object;)Z", "forEach", "", "action", "Lkotlin/Function2;", "Lkotlin/ParameterName;", "name", "getOrDefault", "defaultValue", "(Landroid/util/LongSparseArray;JLjava/lang/Object;)Ljava/lang/Object;", "getOrElse", "Lkotlin/Function0;", "(Landroid/util/LongSparseArray;JLkotlin/jvm/functions/Function0;)Ljava/lang/Object;", "isEmpty", "isNotEmpty", "keyIterator", "Lkotlin/collections/LongIterator;", "plus", "other", "putAll", "remove", "(Landroid/util/LongSparseArray;JLjava/lang/Object;)Z", "set", "(Landroid/util/LongSparseArray;JLjava/lang/Object;)V", "valueIterator", "", "core-ktx_release"}, k = 2, mv = {1, 6, 0}, xi = 48)
  /* compiled from: LongSparseArray.kt */
  public final class LongSparseArrayKt {
      public static final <T> boolean contains(LongSparseArray<T> $this$contains, long key) {
          Intrinsics.checkNotNullParameter($this$contains, "<this>");
          return $this$contains.indexOfKey(key) >= 0;
      }
  
      public static final <T> boolean containsKey(LongSparseArray<T> $this$containsKey, long key) {
          Intrinsics.checkNotNullParameter($this$containsKey, "<this>");
          return $this$containsKey.indexOfKey(key) >= 0;
      }
  
      public static final <T> boolean containsValue(LongSparseArray<T> $this$containsValue, T value) {
          Intrinsics.checkNotNullParameter($this$containsValue, "<this>");
          return $this$containsValue.indexOfValue(value) >= 0;
      }
  
      public static final <T> void forEach(LongSparseArray<T> $this$forEach, Function2<? super Long, ? super T, Unit> action) {
          Intrinsics.checkNotNullParameter($this$forEach, "<this>");
          Intrinsics.checkNotNullParameter(action, "action");
          int size = $this$forEach.size();
          for (int i = 0; i < size; i++) {
              action.invoke(Long.valueOf($this$forEach.keyAt(i)), $this$forEach.valueAt(i));
          }
      }
  
      public static final <T> T getOrDefault(LongSparseArray<T> $this$getOrDefault, long key, T defaultValue) {
          Intrinsics.checkNotNullParameter($this$getOrDefault, "<this>");
          T t = $this$getOrDefault.get(key);
          return t == null ? defaultValue : t;
      }
  
      public static final <T> T getOrElse(LongSparseArray<T> $this$getOrElse, long key, Function0<? extends T> defaultValue) {
          Intrinsics.checkNotNullParameter($this$getOrElse, "<this>");
          Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
          T t = $this$getOrElse.get(key);
          return t == null ? defaultValue.invoke() : t;
      }
  
      public static final <T> int getSize(LongSparseArray<T> $this$size) {
          Intrinsics.checkNotNullParameter($this$size, "<this>");
          return $this$size.size();
      }
  
      public static final <T> boolean isEmpty(LongSparseArray<T> $this$isEmpty) {
          Intrinsics.checkNotNullParameter($this$isEmpty, "<this>");
          return $this$isEmpty.size() == 0;
      }
  
      public static final <T> boolean isNotEmpty(LongSparseArray<T> $this$isNotEmpty) {
          Intrinsics.checkNotNullParameter($this$isNotEmpty, "<this>");
          return $this$isNotEmpty.size() != 0;
      }
  
      public static final <T> LongIterator keyIterator(LongSparseArray<T> $this$keyIterator) {
          Intrinsics.checkNotNullParameter($this$keyIterator, "<this>");
          return new LongSparseArrayKt$keyIterator$1($this$keyIterator);
      }
  
      public static final <T> LongSparseArray<T> plus(LongSparseArray<T> $this$plus, LongSparseArray<T> other) {
          Intrinsics.checkNotNullParameter($this$plus, "<this>");
          Intrinsics.checkNotNullParameter(other, "other");
          LongSparseArray<T> longSparseArray = new LongSparseArray<>($this$plus.size() + other.size());
          putAll(longSparseArray, $this$plus);
          putAll(longSparseArray, other);
          return longSparseArray;
      }
  
      public static final <T> void putAll(LongSparseArray<T> $this$putAll, LongSparseArray<T> other) {
          Intrinsics.checkNotNullParameter($this$putAll, "<this>");
          Intrinsics.checkNotNullParameter(other, "other");
          LongSparseArray<T> longSparseArray = other;
          int size = longSparseArray.size();
          for (int i = 0; i < size; i++) {
              $this$putAll.put(longSparseArray.keyAt(i), longSparseArray.valueAt(i));
          }
      }
  
      public static final <T> boolean remove(LongSparseArray<T> $this$remove, long key, T value) {
          Intrinsics.checkNotNullParameter($this$remove, "<this>");
          int indexOfKey = $this$remove.indexOfKey(key);
          if (indexOfKey < 0 || !Intrinsics.areEqual((Object) value, (Object) $this$remove.valueAt(indexOfKey))) {
              return false;
          }
          $this$remove.removeAt(indexOfKey);
          return true;
      }
  
      public static final <T> void set(LongSparseArray<T> $this$set, long key, T value) {
          Intrinsics.checkNotNullParameter($this$set, "<this>");
          $this$set.put(key, value);
      }
  
      public static final <T> Iterator<T> valueIterator(LongSparseArray<T> $this$valueIterator) {
          Intrinsics.checkNotNullParameter($this$valueIterator, "<this>");
          return new LongSparseArrayKt$valueIterator$1($this$valueIterator);
      }
  }
  