com.google.gerrit.server.account.AutoValue_CachedAccountDetails_Key Maven / Gradle / Ivy
The newest version!
package com.google.gerrit.server.account;
import com.google.gerrit.entities.Account;
import javax.annotation.processing.Generated;
import org.eclipse.jgit.lib.ObjectId;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_CachedAccountDetails_Key extends CachedAccountDetails.Key {
private final Account.Id accountId;
private final ObjectId id;
AutoValue_CachedAccountDetails_Key(
Account.Id accountId,
ObjectId id) {
if (accountId == null) {
throw new NullPointerException("Null accountId");
}
this.accountId = accountId;
if (id == null) {
throw new NullPointerException("Null id");
}
this.id = id;
}
@Override
public Account.Id accountId() {
return accountId;
}
@Override
public ObjectId id() {
return id;
}
@Override
public String toString() {
return "Key{"
+ "accountId=" + accountId + ", "
+ "id=" + id
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof CachedAccountDetails.Key) {
CachedAccountDetails.Key that = (CachedAccountDetails.Key) o;
return this.accountId.equals(that.accountId())
&& this.id.equals(that.id());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= accountId.hashCode();
h$ *= 1000003;
h$ ^= id.hashCode();
return h$;
}
}