edu.stanford.protege.webprotege.perspective.AutoValue_PerspectiveDetails Maven / Gradle / Ivy
package edu.stanford.protege.webprotege.perspective;
import edu.stanford.protege.webprotege.common.LanguageMap;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.annotation.processing.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_PerspectiveDetails extends PerspectiveDetails {
private final PerspectiveId perspectiveId;
private final LanguageMap label;
private final boolean favorite;
private final Node layoutInternal;
AutoValue_PerspectiveDetails(
PerspectiveId perspectiveId,
LanguageMap label,
boolean favorite,
@Nullable Node layoutInternal) {
if (perspectiveId == null) {
throw new NullPointerException("Null perspectiveId");
}
this.perspectiveId = perspectiveId;
if (label == null) {
throw new NullPointerException("Null label");
}
this.label = label;
this.favorite = favorite;
this.layoutInternal = layoutInternal;
}
@Nonnull
@Override
public PerspectiveId getPerspectiveId() {
return perspectiveId;
}
@Nonnull
@Override
public LanguageMap getLabel() {
return label;
}
@Override
public boolean isFavorite() {
return favorite;
}
@Nullable
@Override
protected Node getLayoutInternal() {
return layoutInternal;
}
@Override
public String toString() {
return "PerspectiveDetails{"
+ "perspectiveId=" + perspectiveId + ", "
+ "label=" + label + ", "
+ "favorite=" + favorite + ", "
+ "layoutInternal=" + layoutInternal
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof PerspectiveDetails) {
PerspectiveDetails that = (PerspectiveDetails) o;
return this.perspectiveId.equals(that.getPerspectiveId())
&& this.label.equals(that.getLabel())
&& this.favorite == that.isFavorite()
&& (this.layoutInternal == null ? that.getLayoutInternal() == null : this.layoutInternal.equals(that.getLayoutInternal()));
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= perspectiveId.hashCode();
h$ *= 1000003;
h$ ^= label.hashCode();
h$ *= 1000003;
h$ ^= favorite ? 1231 : 1237;
h$ *= 1000003;
h$ ^= (layoutInternal == null) ? 0 : layoutInternal.hashCode();
return h$;
}
}