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

dagger.internal.codegen.xprocessing.AutoValue_Nullability Maven / Gradle / Ivy

The newest version!
package dagger.internal.codegen.xprocessing;

import com.google.common.collect.ImmutableSet;
import com.squareup.javapoet.ClassName;

// Generated by com.google.auto.value.processor.AutoValueProcessor
final class AutoValue_Nullability extends Nullability {

  private final ImmutableSet nonTypeUseNullableAnnotations;

  private final ImmutableSet typeUseNullableAnnotations;

  private final boolean isKotlinTypeNullable;

  AutoValue_Nullability(
      ImmutableSet nonTypeUseNullableAnnotations,
      ImmutableSet typeUseNullableAnnotations,
      boolean isKotlinTypeNullable) {
    if (nonTypeUseNullableAnnotations == null) {
      throw new NullPointerException("Null nonTypeUseNullableAnnotations");
    }
    this.nonTypeUseNullableAnnotations = nonTypeUseNullableAnnotations;
    if (typeUseNullableAnnotations == null) {
      throw new NullPointerException("Null typeUseNullableAnnotations");
    }
    this.typeUseNullableAnnotations = typeUseNullableAnnotations;
    this.isKotlinTypeNullable = isKotlinTypeNullable;
  }

  @Override
  public ImmutableSet nonTypeUseNullableAnnotations() {
    return nonTypeUseNullableAnnotations;
  }

  @Override
  public ImmutableSet typeUseNullableAnnotations() {
    return typeUseNullableAnnotations;
  }

  @Override
  public boolean isKotlinTypeNullable() {
    return isKotlinTypeNullable;
  }

  @Override
  public String toString() {
    return "Nullability{"
        + "nonTypeUseNullableAnnotations=" + nonTypeUseNullableAnnotations + ", "
        + "typeUseNullableAnnotations=" + typeUseNullableAnnotations + ", "
        + "isKotlinTypeNullable=" + isKotlinTypeNullable
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof Nullability) {
      Nullability that = (Nullability) o;
      return this.nonTypeUseNullableAnnotations.equals(that.nonTypeUseNullableAnnotations())
          && this.typeUseNullableAnnotations.equals(that.typeUseNullableAnnotations())
          && this.isKotlinTypeNullable == that.isKotlinTypeNullable();
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= nonTypeUseNullableAnnotations.hashCode();
    h$ *= 1000003;
    h$ ^= typeUseNullableAnnotations.hashCode();
    h$ *= 1000003;
    h$ ^= isKotlinTypeNullable ? 1231 : 1237;
    return h$;
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy