edu.stanford.protege.webprotege.search.AutoValue_SearchResultMatch Maven / Gradle / Ivy
package edu.stanford.protege.webprotege.search;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.collect.ImmutableList;
import edu.stanford.protege.webprotege.common.DictionaryLanguage;
import edu.stanford.protege.webprotege.entity.EntityNode;
import javax.annotation.Nonnull;
import javax.annotation.processing.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_SearchResultMatch extends SearchResultMatch {
private final EntityNode entity;
private final DictionaryLanguage language;
private final String value;
private final ImmutableList positions;
AutoValue_SearchResultMatch(
EntityNode entity,
DictionaryLanguage language,
String value,
ImmutableList positions) {
if (entity == null) {
throw new NullPointerException("Null entity");
}
this.entity = entity;
if (language == null) {
throw new NullPointerException("Null language");
}
this.language = language;
if (value == null) {
throw new NullPointerException("Null value");
}
this.value = value;
if (positions == null) {
throw new NullPointerException("Null positions");
}
this.positions = positions;
}
@JsonProperty("term")
@Nonnull
@Override
public EntityNode getEntity() {
return entity;
}
@JsonProperty("language")
@Nonnull
@Override
public DictionaryLanguage getLanguage() {
return language;
}
@JsonProperty("value")
@Nonnull
@Override
public String getValue() {
return value;
}
@JsonProperty("positions")
@Nonnull
@Override
public ImmutableList getPositions() {
return positions;
}
@Override
public String toString() {
return "SearchResultMatch{"
+ "entity=" + entity + ", "
+ "language=" + language + ", "
+ "value=" + value + ", "
+ "positions=" + positions
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof SearchResultMatch) {
SearchResultMatch that = (SearchResultMatch) o;
return this.entity.equals(that.getEntity())
&& this.language.equals(that.getLanguage())
&& this.value.equals(that.getValue())
&& this.positions.equals(that.getPositions());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= entity.hashCode();
h$ *= 1000003;
h$ ^= language.hashCode();
h$ *= 1000003;
h$ ^= value.hashCode();
h$ *= 1000003;
h$ ^= positions.hashCode();
return h$;
}
}