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

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

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

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 boolean isKotlinTypeNullable;

  private final ImmutableSet nullableAnnotations;

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

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

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

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

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

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy