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

com.google.errorprone.bugpatterns.AutoValue_ThrowSpecificExceptions_AbstractLikeException Maven / Gradle / Ivy

There is a newer version: 2.27.1
Show newest version
package com.google.errorprone.bugpatterns;

import com.google.errorprone.matchers.Matcher;
import com.sun.source.tree.ExpressionTree;
import javax.annotation.processing.Generated;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_ThrowSpecificExceptions_AbstractLikeException extends ThrowSpecificExceptions.AbstractLikeException {

  private final Matcher matcher;

  private final String replacement;

  AutoValue_ThrowSpecificExceptions_AbstractLikeException(
      Matcher matcher,
      String replacement) {
    if (matcher == null) {
      throw new NullPointerException("Null matcher");
    }
    this.matcher = matcher;
    if (replacement == null) {
      throw new NullPointerException("Null replacement");
    }
    this.replacement = replacement;
  }

  @Override
  Matcher matcher() {
    return matcher;
  }

  @Override
  String replacement() {
    return replacement;
  }

  @Override
  public String toString() {
    return "AbstractLikeException{"
        + "matcher=" + matcher + ", "
        + "replacement=" + replacement
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof ThrowSpecificExceptions.AbstractLikeException) {
      ThrowSpecificExceptions.AbstractLikeException that = (ThrowSpecificExceptions.AbstractLikeException) o;
      return this.matcher.equals(that.matcher())
          && this.replacement.equals(that.replacement());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= matcher.hashCode();
    h$ *= 1000003;
    h$ ^= replacement.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy