com.google.gerrit.server.index.AutoValue_StalenessCheckResult Maven / Gradle / Ivy
package com.google.gerrit.server.index;
import java.util.Optional;
import javax.annotation.processing.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_StalenessCheckResult extends StalenessCheckResult {
private final boolean isStale;
private final Optional reason;
AutoValue_StalenessCheckResult(
boolean isStale,
Optional reason) {
this.isStale = isStale;
if (reason == null) {
throw new NullPointerException("Null reason");
}
this.reason = reason;
}
@Override
public boolean isStale() {
return isStale;
}
@Override
public Optional reason() {
return reason;
}
@Override
public String toString() {
return "StalenessCheckResult{"
+ "isStale=" + isStale + ", "
+ "reason=" + reason
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof StalenessCheckResult) {
StalenessCheckResult that = (StalenessCheckResult) o;
return this.isStale == that.isStale()
&& this.reason.equals(that.reason());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= isStale ? 1231 : 1237;
h$ *= 1000003;
h$ ^= reason.hashCode();
return h$;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy