content: /*
   * Decompiled with CFR 0.153-SNAPSHOT (d6f6758-dirty).
   */
  package kotlin.io;
  
  import java.io.File;
  import java.util.List;
  import kotlin.Metadata;
  import kotlin.collections.CollectionsKt;
  import kotlin.jvm.internal.Intrinsics;
  import org.jetbrains.annotations.NotNull;
  import org.jetbrains.annotations.Nullable;
  
  @Metadata(mv={1, 4, 0}, bv={1, 0, 3}, k=1, d1={"\u00000\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010 \n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0004\n\u0002\u0010\u000e\n\u0002\b\u0005\n\u0002\u0010\b\n\u0002\b\r\b\u0080\b\u0018\u00002\u00020\u0001B\u001d\b\u0000\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\f\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00030\u0005\u00a2\u0006\u0002\u0010\u0006J\t\u0010\u0016\u001a\u00020\u0003H\u00c6\u0003J\u000f\u0010\u0017\u001a\b\u0012\u0004\u0012\u00020\u00030\u0005H\u00c6\u0003J#\u0010\u0018\u001a\u00020\u00002\b\b\u0002\u0010\u0002\u001a\u00020\u00032\u000e\b\u0002\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00030\u0005H\u00c6\u0001J\u0013\u0010\u0019\u001a\u00020\b2\b\u0010\u001a\u001a\u0004\u0018\u00010\u0001H\u00d6\u0003J\t\u0010\u001b\u001a\u00020\u0013H\u00d6\u0001J\u0016\u0010\u001c\u001a\u00020\u00032\u0006\u0010\u001d\u001a\u00020\u00132\u0006\u0010\u001e\u001a\u00020\u0013J\t\u0010\u001f\u001a\u00020\rH\u00d6\u0001R\u0011\u0010\u0007\u001a\u00020\b8F\u00a2\u0006\u0006\u001a\u0004\b\u0007\u0010\tR\u0011\u0010\u0002\u001a\u00020\u0003\u00a2\u0006\b\n\u0000\u001a\u0004\b\n\u0010\u000bR\u0011\u0010\f\u001a\u00020\r8F\u00a2\u0006\u0006\u001a\u0004\b\u000e\u0010\u000fR\u0017\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00030\u0005\u00a2\u0006\b\n\u0000\u001a\u0004\b\u0010\u0010\u0011R\u0011\u0010\u0012\u001a\u00020\u00138F\u00a2\u0006\u0006\u001a\u0004\b\u0014\u0010\u0015\u00a8\u0006 "}, d2={"Lkotlin/io/FilePathComponents;", "", "root", "Ljava/io/File;", "segments", "", "(Ljava/io/File;Ljava/util/List;)V", "isRooted", "", "()Z", "getRoot", "()Ljava/io/File;", "rootName", "", "getRootName", "()Ljava/lang/String;", "getSegments", "()Ljava/util/List;", "size", "", "getSize", "()I", "component1", "component2", "copy", "equals", "other", "hashCode", "subPath", "beginIndex", "endIndex", "toString", "kotlin-stdlib"})
  public final class FilePathComponents {
      @NotNull
      private final File root;
      @NotNull
      private final List<File> segments;
  
      @NotNull
      public final String getRootName() {
          String string = this.root.getPath();
          Intrinsics.checkNotNullExpressionValue(string, "root.path");
          return string;
      }
  
      public final boolean isRooted() {
          String string = this.root.getPath();
          Intrinsics.checkNotNullExpressionValue(string, "root.path");
          CharSequence charSequence = string;
          boolean bl = false;
          return charSequence.length() > 0;
      }
  
      public final int getSize() {
          return this.segments.size();
      }
  
      @NotNull
      public final File subPath(int beginIndex, int endIndex) {
          if (beginIndex < 0 || beginIndex > endIndex || endIndex > this.getSize()) {
              throw (Throwable)new IllegalArgumentException();
          }
          Iterable iterable = this.segments.subList(beginIndex, endIndex);
          String string = File.separator;
          Intrinsics.checkNotNullExpressionValue(string, "File.separator");
          return new File(CollectionsKt.joinToString$default(iterable, string, null, null, 0, null, null, 62, null));
      }
  
      @NotNull
      public final File getRoot() {
          return this.root;
      }
  
      @NotNull
      public final List<File> getSegments() {
          return this.segments;
      }
  
      public FilePathComponents(@NotNull File root, @NotNull List<? extends File> segments) {
          Intrinsics.checkNotNullParameter(root, "root");
          Intrinsics.checkNotNullParameter(segments, "segments");
          this.root = root;
          this.segments = segments;
      }
  
      @NotNull
      public final File component1() {
          return this.root;
      }
  
      @NotNull
      public final List<File> component2() {
          return this.segments;
      }
  
      @NotNull
      public final FilePathComponents copy(@NotNull File root, @NotNull List<? extends File> segments) {
          Intrinsics.checkNotNullParameter(root, "root");
          Intrinsics.checkNotNullParameter(segments, "segments");
          return new FilePathComponents(root, segments);
      }
  
      public static /* synthetic */ FilePathComponents copy$default(FilePathComponents filePathComponents, File file, List list, int n, Object object) {
          if ((n & 1) != 0) {
              file = filePathComponents.root;
          }
          if ((n & 2) != 0) {
              list = filePathComponents.segments;
          }
          return filePathComponents.copy(file, list);
      }
  
      @NotNull
      public String toString() {
          return "FilePathComponents(root=" + this.root + ", segments=" + this.segments + ")";
      }
  
      public int hashCode() {
          File file = this.root;
          List<File> list = this.segments;
          return (file != null ? ((Object)file).hashCode() : 0) * 31 + (list != null ? ((Object)list).hashCode() : 0);
      }
  
      public boolean equals(@Nullable Object object) {
          block3: {
              block2: {
                  if (this == object) break block2;
                  if (!(object instanceof FilePathComponents)) break block3;
                  FilePathComponents filePathComponents = (FilePathComponents)object;
                  if (!Intrinsics.areEqual(this.root, filePathComponents.root) || !Intrinsics.areEqual(this.segments, filePathComponents.segments)) break block3;
              }
              return true;
          }
          return false;
      }
  }
  
  