com.google.errorprone.bugpatterns.AutoValue_UnnecessaryMethodReference_KnownAlias Maven / Gradle / Ivy
package com.google.errorprone.bugpatterns;
import com.google.errorprone.matchers.Matcher;
import com.google.errorprone.predicates.TypePredicate;
import com.sun.source.tree.ExpressionTree;
import javax.annotation.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_UnnecessaryMethodReference_KnownAlias extends UnnecessaryMethodReference.KnownAlias {
private final Matcher matcher;
private final TypePredicate targetType;
AutoValue_UnnecessaryMethodReference_KnownAlias(
Matcher matcher,
TypePredicate targetType) {
if (matcher == null) {
throw new NullPointerException("Null matcher");
}
this.matcher = matcher;
if (targetType == null) {
throw new NullPointerException("Null targetType");
}
this.targetType = targetType;
}
@Override
Matcher matcher() {
return matcher;
}
@Override
TypePredicate targetType() {
return targetType;
}
@Override
public String toString() {
return "KnownAlias{"
+ "matcher=" + matcher + ", "
+ "targetType=" + targetType
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof UnnecessaryMethodReference.KnownAlias) {
UnnecessaryMethodReference.KnownAlias that = (UnnecessaryMethodReference.KnownAlias) o;
return this.matcher.equals(that.matcher())
&& this.targetType.equals(that.targetType());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= matcher.hashCode();
h$ *= 1000003;
h$ ^= targetType.hashCode();
return h$;
}
}