dagger.internal.codegen.binding.AutoValue_Nullability Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dagger-compiler Show documentation
Show all versions of dagger-compiler Show documentation
A fast dependency injector for Android and Java.
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$;
}
}