All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.veithen.maven.hermetic.AutoValue_PathSpec Maven / Gradle / Ivy



package com.github.veithen.maven.hermetic;

import java.nio.file.Path;
import javax.annotation.Generated;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_PathSpec extends PathSpec {

  private final Path path;

  private final int depth;

  private final boolean directory;

  AutoValue_PathSpec(
      Path path,
      int depth,
      boolean directory) {
    if (path == null) {
      throw new NullPointerException("Null path");
    }
    this.path = path;
    this.depth = depth;
    this.directory = directory;
  }

  @Override
  Path path() {
    return path;
  }

  @Override
  int depth() {
    return depth;
  }

  @Override
  boolean directory() {
    return directory;
  }

  @Override
  public String toString() {
    return "PathSpec{"
         + "path=" + path + ", "
         + "depth=" + depth + ", "
         + "directory=" + directory
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof PathSpec) {
      PathSpec that = (PathSpec) o;
      return this.path.equals(that.path())
          && this.depth == that.depth()
          && this.directory == that.directory();
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= path.hashCode();
    h$ *= 1000003;
    h$ ^= depth;
    h$ *= 1000003;
    h$ ^= directory ? 1231 : 1237;
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy