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

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

There is a newer version: 2.52
Show newest version
package dagger.internal.codegen.binding;

import androidx.room.compiler.processing.XAnnotation;
import java.util.Optional;

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

  private final boolean isNullable;

  private final Optional nullableAnnotation;

  AutoValue_Nullability(
      boolean isNullable,
      Optional nullableAnnotation) {
    this.isNullable = isNullable;
    if (nullableAnnotation == null) {
      throw new NullPointerException("Null nullableAnnotation");
    }
    this.nullableAnnotation = nullableAnnotation;
  }

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

  @Override
  public Optional nullableAnnotation() {
    return nullableAnnotation;
  }

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

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

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy