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

com.google.errorprone.bugpatterns.nullness.AutoValue_NullnessUtils_NullableAnnotationToUse Maven / Gradle / Ivy

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

import javax.annotation.Generated;
import javax.annotation.Nullable;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_NullnessUtils_NullableAnnotationToUse extends NullnessUtils.NullableAnnotationToUse {

  private final String importToAdd;

  private final String use;

  private final boolean isTypeUse;

  private final boolean isAlreadyInScope;

  AutoValue_NullnessUtils_NullableAnnotationToUse(
      @Nullable String importToAdd,
      String use,
      boolean isTypeUse,
      boolean isAlreadyInScope) {
    this.importToAdd = importToAdd;
    if (use == null) {
      throw new NullPointerException("Null use");
    }
    this.use = use;
    this.isTypeUse = isTypeUse;
    this.isAlreadyInScope = isAlreadyInScope;
  }

  @Nullable
  @Override
  String importToAdd() {
    return importToAdd;
  }

  @Override
  String use() {
    return use;
  }

  @Override
  boolean isTypeUse() {
    return isTypeUse;
  }

  @Override
  boolean isAlreadyInScope() {
    return isAlreadyInScope;
  }

  @Override
  public String toString() {
    return "NullableAnnotationToUse{"
         + "importToAdd=" + importToAdd + ", "
         + "use=" + use + ", "
         + "isTypeUse=" + isTypeUse + ", "
         + "isAlreadyInScope=" + isAlreadyInScope
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof NullnessUtils.NullableAnnotationToUse) {
      NullnessUtils.NullableAnnotationToUse that = (NullnessUtils.NullableAnnotationToUse) o;
      return (this.importToAdd == null ? that.importToAdd() == null : this.importToAdd.equals(that.importToAdd()))
          && this.use.equals(that.use())
          && this.isTypeUse == that.isTypeUse()
          && this.isAlreadyInScope == that.isAlreadyInScope();
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= (importToAdd == null) ? 0 : importToAdd.hashCode();
    h$ *= 1000003;
    h$ ^= use.hashCode();
    h$ *= 1000003;
    h$ ^= isTypeUse ? 1231 : 1237;
    h$ *= 1000003;
    h$ ^= isAlreadyInScope ? 1231 : 1237;
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy