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

com.google.gerrit.server.index.change.AutoValue_StalenessChecker_RefStatePattern Maven / Gradle / Ivy

The newest version!
package com.google.gerrit.server.index.change;

import java.util.regex.Pattern;
import javax.annotation.processing.Generated;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_StalenessChecker_RefStatePattern extends StalenessChecker.RefStatePattern {

  private final String pattern;

  private final String prefix;

  private final Pattern regex;

  AutoValue_StalenessChecker_RefStatePattern(
      String pattern,
      String prefix,
      Pattern regex) {
    if (pattern == null) {
      throw new NullPointerException("Null pattern");
    }
    this.pattern = pattern;
    if (prefix == null) {
      throw new NullPointerException("Null prefix");
    }
    this.prefix = prefix;
    if (regex == null) {
      throw new NullPointerException("Null regex");
    }
    this.regex = regex;
  }

  @Override
  String pattern() {
    return pattern;
  }

  @Override
  String prefix() {
    return prefix;
  }

  @Override
  Pattern regex() {
    return regex;
  }

  @Override
  public String toString() {
    return "RefStatePattern{"
        + "pattern=" + pattern + ", "
        + "prefix=" + prefix + ", "
        + "regex=" + regex
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof StalenessChecker.RefStatePattern) {
      StalenessChecker.RefStatePattern that = (StalenessChecker.RefStatePattern) o;
      return this.pattern.equals(that.pattern())
          && this.prefix.equals(that.prefix())
          && this.regex.equals(that.regex());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= pattern.hashCode();
    h$ *= 1000003;
    h$ ^= prefix.hashCode();
    h$ *= 1000003;
    h$ ^= regex.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy