org.graylog2.plugin.lookup.AutoValue_LookupCacheKey Maven / Gradle / Ivy
package org.graylog2.plugin.lookup;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.Nullable;
import javax.annotation.processing.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_LookupCacheKey extends LookupCacheKey {
private final String prefix;
@Nullable
private final Object key;
AutoValue_LookupCacheKey(
String prefix,
@Nullable Object key) {
if (prefix == null) {
throw new NullPointerException("Null prefix");
}
this.prefix = prefix;
this.key = key;
}
@JsonProperty("prefix")
@Override
public String prefix() {
return prefix;
}
@JsonProperty("key")
@Nullable
@Override
public Object key() {
return key;
}
@Override
public String toString() {
return "LookupCacheKey{"
+ "prefix=" + prefix + ", "
+ "key=" + key
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof LookupCacheKey) {
LookupCacheKey that = (LookupCacheKey) o;
return this.prefix.equals(that.prefix())
&& (this.key == null ? that.key() == null : this.key.equals(that.key()));
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= prefix.hashCode();
h$ *= 1000003;
h$ ^= (key == null) ? 0 : key.hashCode();
return h$;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy